JSFiddle - React, Tailwind, and code Playground
by spicyj
HTML
<script src="http://fb.me/react-js-fiddle-integration.js"></script>
JavaScript 1.7
/** @jsx React.DOM */
var Hello = React.createClass({
getInitialState: function() {
return {showTable: false};
},
componentDidMount: function() {
this.setState({showTable: true});
},
render: function() {
var table;
if (this.state.showTable) {
return <table>oops!</table>;
} else {
return <div>loading...</div>;
}
}
});
React.renderComponent(<Hello name="World" />, document.body);