erikras / erikras/react-redux-universal-hot-example
How to add new state to the Redux store?
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
I am new to this project, and I am enjoying reading the code. But I am having a hard time figuring out how to add my app's (new) state to the store.
The specifics of my app is that my server.js code will receive data asynchronously from some other server, which needs to be reflected in the GUI.
My understanding of the Redux pattern is that my server code should create actions for each newly-arrived bit of information and then dispatch them to the store. The update in the store then propagates to the React containers/components that rely on it.
I realize that this might be more of a Redux question, but I would love to see an outline of steps for the following in react-redux-universal-hot-example:
1. Extending the 'schema' of the store with a new kind of information. (I'm not sure how to ensure that my new state data won't conflict with existing info in the store);
2. Creating actions (I think that's straightforward - simply make a new object with `{ type: xxx, ... }`)
3. Hooking those actions into the dispatch() method. (I see the @asyncConnect() and @ connect() methods, but don't entirely understand what they do.)
4. and whatever else needs to happen...
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.