-
Notifications
You must be signed in to change notification settings - Fork 216
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Is it possible for the state not to contain functions? #105
Comments
Also the |
Try using |
@PAkerstrand @acdlite
To my html when rendering server-side but with the functions we're now getting there are references to react (_react2['default']) which are incompatible with the rest of my code. (i'm using webpack for client-side & node-babel for server-side code) Edit: I'm sure i can make React an external and solve it that way but... Is there any other way to do it? Why should i even send router state down the wire? |
I would also like for actions to be serializable for an entirely different reason...persistence. If I can JSON.stringify it, I can store it in PouchDB. |
Im actually very interested in exploring ways we could remove react components and functions from the store. Not only do people have issues with serialization but it also affects tools such as the redux-dev-tools extension. As far as I can tell, including the children and routes in the store is useful only for replacing routes dynamically via an action-creator, something which I believe Best case would be to accomplish the hot-swapping via another method but Im not sure its possible |
Totally agree with that. Though I would argue we postpone work on this until after the next release, as it isn´t a major bug/issue. |
I disagree that it isn't a major bug/issue. It makes it impossible for me to do proper server-sde rendering. |
@hmeerlo unfortunately its quite difficult to store only "part" of the router state in redux. You esentially need the redux store to drive all of the router, or none of it at all.
I did some playing with using React-Router 2's new |
I guess we can close this for now. |
Current
router.components
androuter.routes
contain functions. This means that I can't serialize the state into JSON without getting a circular reference error. Is it possible to make the state serializable, or can I just ignore these two properties and they will get rebuilt or something?The text was updated successfully, but these errors were encountered: