This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 787
Server-side rendering: renderToStringWithData causing react warning #169
Labels
Comments
I've noticed you added a note about this on the documentation: I'm currently using |
@hugoduraes yes! We are still thinking through the best way to make this useful. Currently we are thinking |
That's perfect. It solves the problem and it's a simple fix. Looking forward to it. :) |
@jbaxleyiii should I just implement this? |
@tmeasday I've got it done in a local branch. I'll push it up! |
@jbaxleyiii Cool! :) When do you plan to make a release containing this? |
@hugoduraes today is the plan! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm experiencing this warning while rendering on the server side using the method
renderToStringWithData
:This is
renderToStringWithData
current implementation:I believe the warning is being caused by the injection of the payload on the markup, which will end up on the target node. On the client side, when React tries to render the components on the target node, it finds an unrelated node (the
script
tag) and throws the warning.I think this method should be changed so that it does not render the component but calculates the initialState and returns it instead.
What are your thoughts about this?
The text was updated successfully, but these errors were encountered: