React Base Fiddle (JSX)
Starting point for creating JSFiddles with React. This uses React with Addons.
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.1/JSXTransformer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.1/react-with-addons.js"></script>
<script src="https://facebook.github.io/react/js/jsfiddle-integration.js"></script>
<div class = 'outer-container'>
<p>
I can see this hello.
</p>
<div id="container">
<!-- This element's contents will be replaced with your component. -->
<p>
Hello React
</p>
</div>
</div>
JavaScript 1.7
var Hello = React.createClass({
render: function() {
return (
<div className="Button">
<span className="left" onClick={function() {alert("left")}}>Left</span>
<span className="right" onClick={function() {alert("right")}}>Right</span>
<span className="middle" onClick={function() {alert("middle")}}>Middle</span>
</div>
);
}
});
React.render(<Hello name="World" />, document.getElementById('container'));