Last active
July 15, 2016 14:54
-
-
Save terrierscript/bab38b0825b67e73a3b647d32f9186ed to your computer and use it in GitHub Desktop.
Reactでprototypingする時にdocument.bodyにレンダリングすんな!って怒られた時の回避 ref: http://qiita.com/inuscript/items/552b8e332f95d0928b2b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ReactDom.render( | |
| <Main />, | |
| document.body | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Warning: render(): Rendering components | |
| directly into document.body is discouraged, | |
| since its children are often manipulated by third-party | |
| scripts and browser extensions. | |
| This may lead to subtle reconciliation issues. | |
| Try rendering into a container element created for your app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ReactDom.render( | |
| <Main />, | |
| document.body.appendChild(document.createElement('div')) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ReactDom.render( | |
| <Main />, | |
| document.body.appendChild(document.createElement('div')) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment