Skip to content

Instantly share code, notes, and snippets.

@NSLog0
Last active September 11, 2017 01:59
Show Gist options
  • Select an option

  • Save NSLog0/9311f66358640b03f6eb5f99cce56f5f to your computer and use it in GitHub Desktop.

Select an option

Save NSLog0/9311f66358640b03f6eb5f99cce56f5f to your computer and use it in GitHub Desktop.
react tutorail
var item = document.getElementById("item");
item.parentNode.removeChild(item);
// 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')
);
// 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