Comments (3)
There shouldn't be a difference since createStore
uses BaseStore
under the hood. Make sure you are calling emitChange
in your store's handlers so that dispatchr knows to dehydrate the store.
from dispatchr.
I think that is part of the issue, I was using this.emit('change')
. I also am using rehydrate
to populate the store in my route action, where it sounds like I should instead execute a set state action to trigger a regular change event?
from dispatchr.
Correct, you should only be calling dispatch
in actions and have stores listen to these data events to update themselves. Stores should never be modified directly from an action.
from dispatchr.
Related Issues (20)
- Investigate Synchronous Dispatching
- Investigate replay-based rehydration HOT 8
- Handler definitions as functions to promote a sort of Revealing Module Pattern
- Add helper functions to Readme
- Bowerify the dispatchr HOT 3
- Encourage passing constructors to getStore and waitFor instead of strings HOT 1
- Ability to have handler for all actions HOT 4
- React errors caused by BaseStore emit do not reach the console HOT 3
- can emitChange from store support passing a paylod that holds an id HOT 6
- Pull `/utils/BaseStore.js` into it's own module HOT 2
- Does createStore support mixing in event handlers? HOT 3
- Introduce store method `shouldDehydrate` to disable dehydration for a store HOT 2
- Errors during action handlers HOT 5
- require('util'), why? HOT 19
- Why the Dispatcher don't return the class directly? HOT 11
- Throw an error if actionName passed to Dispatcher#dispatch is undefined HOT 4
- docblock incorrectly mentions queueing
- Tie together multiple actions of one async operation HOT 2
- Unable to affect state asynchronously from store, apply component `this` to handler function? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dispatchr.