Open rpominov opened 9 years ago
Perhaps it's a good idea if stores could also provide functions for serialization and deserialization of their state. Something like:
const myStore = { initial() { /*...*/ }, serialize(storeState) { /* must return string */ }, deserialize(stateAsString) { /* returns state */ }, reducers: { /*...*/ } }
Then we could implement str = fluce.serialize() / fluce.deserialize(str), which can be used to send current state from server in an isomorphic app.
str = fluce.serialize()
fluce.deserialize(str)
Perhaps it's a good idea if stores could also provide functions for serialization and deserialization of their state. Something like:
Then we could implement
str = fluce.serialize()
/fluce.deserialize(str)
, which can be used to send current state from server in an isomorphic app.