Open eguneys opened 9 years ago
I have setup an redux application using this repo as an example. I have two reducers gamePlay and saveStore.
gamePlay
saveStore
gamePlay store is a regular store using some state. saveStore store is a special store for saving properties on other stores and later restoring them.
In order for this to work, I make use of actions. Here's the gist of my application: https://gist.github.com/eguneys/a12bbe3b3e33254b3af2.
I have two questions:
There are some examples here: https://github.com/gaearon/redux/pull/278/files#diff-755395ebcb422a6745dd7de738db93dbR1, but I couldn't figure out how to do it.
Here is my quick reply:
The whole application now is just one store (each store in your mind now is one of store's properties) Then, if you want to test, just dispatch an action, and do assert on your only store.
I have setup an redux application using this repo as an example. I have two reducers
gamePlay
andsaveStore
.gamePlay
store is a regular store using some state.saveStore
store is a special store for saving properties on other stores and later restoring them.In order for this to work, I make use of actions. Here's the gist of my application: https://gist.github.com/eguneys/a12bbe3b3e33254b3af2.
I have two questions:
There are some examples here: https://github.com/gaearon/redux/pull/278/files#diff-755395ebcb422a6745dd7de738db93dbR1, but I couldn't figure out how to do it.