JSFiddle - React, Tailwind, and code Playground

by vjeux

HTML

<script src="http://fb.me/react-with-addons-0.8.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.8.0.js"></script>
<script src="http://fb.me/react-js-fiddle-integration.js"></script>

JavaScript 1.7

/** @jsx React.DOM */

var Fibonacci = React.createClass({
    render: function() {
        if (this.props.n_1 > 1000) {
            return <div>Too big</div>;
        }
        return <div>
            The next number is {this.props.n_1}
            <Fibonacci n={this.props.n + this.props.n_1} n_1={this.props.n} />
        </div>;
    }
});
 
React.renderComponent(<Fibonacci n={1} n_1={1} />, document.body);