React Base Fiddle (CJSX)

Starting point for creating JSFiddles with React and CJSX. This uses React with Addons.

by also

HTML

<script src="//fb.me/react-0.13.0-rc2.js"></script>
<script src="//wzrd.in/standalone/coffee-react-transform"></script>
<script src="http://bit.ly/cjsx-jsfiddle-integration"></script>

CoffeeScript

AsyncLoader = React.createClass
  render: ->
    null

  componentDidMount: ->
    @timeout = setTimeout =>
      @setState({setTimeout: true})
    , 2000


Application = React.createClass
  getInitialState: ->
    {visible: true}

  render: ->
    if @state.visible
      <AsyncLoader />
    else
      null

  componentDidMount: ->
    setTimeout =>
      @setState({visible: false})
    , 1000
 
React.render <Application />, document.body