Compose a react DOM node like so:

var p = React.createElement('p', null, 'Hey there React!');

We can do the same using the DOM helper methods, like so:

var p = React.DOM.p(null, 'Hello React!');

We can select a DOM node using regular DOM scripting, like so:

var el =document.getElementById('example');

We can then append it to the DOM like so:

React.render(p, el);

Do you like Email? Do You Like JavaScript?

Sign up for occasional emails covering modern Web Development topics such as Angular 2 and React. You can unsubscribe at any time.

We totally respect your email privacy

comments powered by Disqus