React Base Fiddle (JSX)
Starting point for creating JSFiddles with React. This uses React with Addons.
by Denis Pavlov
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.3/react-with-addons.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://facebook.github.io/react/js/jsfiddle-integration.js"></script>
JavaScript 1.7
var Hello = React.createClass({
render: function() {
return <div>{'Hello ' + this.props.name}</div>;
}
});
var Goodbye = React.createClass({
render: function () {
return <p>{'Goodbye'}</p>;
}
});
React.render(
<div>
{new Date().getDate() % 2 == 0
? <Hello name="Thomas" />
: <Goodbye />}
</div>, document.body);