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);
Next Exercise: Child Nodes >>>
comments powered by Disqus