Skip to content

Conversation

jsbaltodano
Copy link
Contributor

Allow react-rails to use ReactDOM.render in components created whose value for prerender is falsy (false, nil).

Summary

React gives a warning when a not pre-rendered component is not rendered using ReactDOM.render()
Following advise from #842
A new html option has been added to use between the ReactDOM methods render() or hydrate().

render()
prerender not set or set to a falsy value

hydrate()
truthy value and not :static

Allow react-rails to use ReactDOM.render in components created whose value for prerender is falsy (false, nil).
@BookOfGreg
Copy link
Member

This is excellent, thanks for the contribution!
I'll make a small tweak to the changelog to reference the issue and this PR and add a ruby test for the new data attr after I merge this. Great help! 😁

@BookOfGreg BookOfGreg merged commit f02a3af into reactjs:master Nov 27, 2017
BookOfGreg added a commit that referenced this pull request Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants