Last active
December 6, 2015 00:59
-
-
Save jacksonrayhamilton/eeadc1e411fda90971b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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