Last active
September 11, 2017 01:59
-
-
Save NSLog0/9311f66358640b03f6eb5f99cce56f5f to your computer and use it in GitHub Desktop.
react tutorail
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
| var item = document.getElementById("item"); | |
| item.parentNode.removeChild(item); |
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
| // requrie react here | |
| var Hello = React.createClass({ | |
| displayName: 'Hello', | |
| render: function() { | |
| return React.createElement("div", null, "Hello ", null); | |
| } | |
| }); | |
| ReactDOM.render( | |
| React.createElement(Hello), | |
| document.getElementById('container') | |
| ); |
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
| // requrie react here | |
| var Hello = React.createClass({ | |
| render: function() { | |
| return <div>Hello</div>; | |
| } | |
| }); | |
| ReactDOM.render( | |
| <Hello />, | |
| document.getElementById('container') | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment