Skip to content

Instantly share code, notes, and snippets.

@jacksonrayhamilton
Last active December 6, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacksonrayhamilton/eeadc1e411fda90971b2 to your computer and use it in GitHub Desktop.
Save jacksonrayhamilton/eeadc1e411fda90971b2 to your computer and use it in GitHub Desktop.
const ExampleComponent1 = React.createClass({
render: function () {
return (
<div className="example">
<h1>Example Component 1</h1>
<ul>
<li>One item</li>
<li>Another item</li>
</ul>
</div>
);
}
});
const ExampleComponent2 = React.createClass({
render: function () {
const $ = React.createElement;
return (
$('div', { className: 'example' },
$('h1', null, 'Example Component 2'),
$('ul', null,
$('li', null, 'One item'),
$('li', null, 'Another item')))
);
}
});
const $ = React.createElement;
ReactDOM.render(
$('div', null,
<ExampleComponent1 />,
$(ExampleComponent2)),
document.querySelector('.content')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment