-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Slight improvement to the 'no hydrated stores' error #605
Slight improvement to the 'no hydrated stores' error #605
Conversation
This should make it more clear that rendering `redux_store_hydration_data` is required.
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. node_package/src/StoreRegistry.js, line 46 at r1 (raw file):
@cookiefission this is awesome. Can you try this out with a \n to clearly delineate the "ands" and the "or". Comments from Reviewable |
This should more cleanly differentiate the two cases
Please see my suggestion. Try replacing and see if you like it. Reviewed 1 of 1 files at r2. node_package/src/StoreRegistry.js, line 46 at r1 (raw file):
|
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. node_package/src/StoreRegistry.js, line 46 at r1 (raw file):
Hey the formatting got skewered in my prior comment, @cookiefission const msg =
`There are no stores hydrated and you are requesting the store ${name}.
This can happen if you are server rendering and either:
1. You do not call redux_store near the top of your controller action's view (not the layout)
and before any call to react_component.
2. You do not render redux_store_hydration_data anywhere on your page.` Notice there are backticks around the whole string. Comments from Reviewable |
I updated my comment. Please use backticks. Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
Reviewed 1 of 1 files at r3. Comments from Reviewable |
As per review comments
@cookiefission Did you try this out? You indented the lines, and the indents will be part of the message. I don't think you want the indents. Please paste a screenshot of how the message prints out. |
Thanks @cookiefission! |
Hi,
When I was trying to set up server side rendering, I ran into the 'no hydrated stores' error. After some digging, I realised I hadn't called
redux_store_hydration_data
anywhere in my view.This should hopefully make it more clear that rendering
redux_store_hydration_data
is required.Thanks
This change is