-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
React.renderComponentToString failing case when component children is a function #860
Comments
JSFiddle: http://jsfiddle.net/vjeux/E8gCL/ |
Reduced to var Hello = React.createClass({
render: function() {
return this.props.children;
}
});
React.renderComponentToString(
Hello(null, React.DOM.div(null, "Hello")),
function(s) { console.log(s); }
); |
@vjeux Your last fiddle doesn't repro the problem for me; the componentDidMount is significant. |
@spicyj : Woops you are right, I rushed the comment :( http://jsfiddle.net/vjeux/E8gCL/2/ |
Breaks on 0.8.0 on browser only, but not on master for me. (Noticed the breaking with componentDidMount some time ago but didn't file an issue as perhaps there had been an issue already) |
I have a fix for this |
@petehunt But those fiddles seem to work ok on current master? |
The fix is for the somewhat related putListener() memory leak |
I believe this was fixed by e73900d. |
I haven't had a chance to verify myself but according to an Om user this issue is still not fixed. omcljs/om#47, they tested with a recent React commit 4974734 |
Well, http://jsfiddle.net/E8gCL/4/ works for me now. |
(Filed #1079 which is probably the underlying cause even though the symptoms here changed.) |
I've confirmed that this is no longer a problem in Om w/ React master. |
@swannodette This works for you?
|
@spicyj actually that does not work. But the custom component cases work. |
Results in:
The text was updated successfully, but these errors were encountered: