<div id="app">
  </app>

body {
  background: #333;
  color: white;
}
 
/*
Example for children types in React.
*/

class Application extends React.Component {
  render() {
    return (
      <div>
        {/*String as children type*/}
        <h2>Rendering string as children type</h2>
        <hr />
        <h1> Array as children type</h1>
        {/*Array as childen type*/}
        <ul>
          {['child1', 'child2'].map(text => (
            <h2 key={text}>{text}</h2>
          ))}
        </ul>
      </div>
    );
  }
}

/*
 * Render the above component into the div#app
 */
React.render(<Application />, document.getElementById('app'));
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/0.13.0/react.min.js