-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions about serialization / deserialization #15
Comments
Hi! Thanks for the feedback. I agree that this seems redundant if your stores only contain JSON stringifiable (is that a word?) data, but it's often the case that Store data is not JSON stringifiable — for instance, using Immutable.js data types. In that case, The calls to
Then we iterate over the values and send the strings to the stores for deserialization. In other words, Does that make sense? I'm open to suggestions for how to make this better. |
Ah! I read your comment again, and looked at the code again, and now I see the real issue — I'm passing the entire state string to My previous comment is how it should work, though, so if you have any suggestions for how it could be better I'd still like to hear them :) |
Fixed in 2.5.1 |
First I have to say that this is a great library. I'm currently using it in one of my projects and stumbled upon some smaller issues.
JSON.stringify({ A: JSON.stringify(A.state), B: JSON.stringify(B.state) })
although those two inner stringifications (is that a word?!) are not necessary.let storeState = deserialize(state[key]);
and pass only the state to each store that is relevant for it.The text was updated successfully, but these errors were encountered: