React Base Fiddle (JSX)

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

by ecmanaut

HTML

<script src="https://fb.me/react-with-addons-0.14.0-rc1.js"></script>
<script src="https://fb.me/react-dom-0.14.0-rc1.js"></script>
<div id="app"></div>

CSS

.hello {
    background: yellow;
    display: block;
}

Babel + JSX

class Hello extends React.Component {
  render() {
    return (
      <div>
          <div className="hello">Hello {this.props.name} (div)</div>
          <custom-elem class="hello">Hello {this.props.name} (custom-elem)</custom-elem>
      </div>
    );
  }
}

React.render(<Hello name="World"/>, document.getElementById('app'));