-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
setState in componentWillMount causes TypeError when rendering with renderToString and preceded by a component that renders with renderToString #6423
Comments
Do we even support this? If we don't we should have a good early error message. |
Yes, it is a supported feature according to the docs:
Based on that the feature ought to work regardless of rendering method. |
I've been looking at this issue this morning and it seems that it stems, at least partially, from the fact that If you switch the order and render it second, then If you remove the final ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy); from |
So it looks like by the time Since |
cc @spicyj |
I still have a rather naive understanding of how |
IIRC we don't support nested server rendering at the moment and have another issue about it somewhere. |
Calling
setState
incomponentWillMount
of a component causes the errorwhen rendering server-side with
ReactDOMServer.renderToString
and preceded by a component that renders content usingReactDOMServer.renderToString
orReactDOMServer.renderToStaticMarkup
.Causes TypeError with 0.14.8 and 15.0.0-rc.2:
https://github.com/PKJedi/react-dom-server-test/blob/master/test.js
Works with 0.13:
https://github.com/PKJedi/react-dom-server-test/blob/master/0.13/test.js
The text was updated successfully, but these errors were encountered: