JSFiddle

  • React Base Fiddle (JSX) #1 is the latest revision

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

    class Hello extends React.Component {
      constructor(props) {
        super(props)
        this.onSubmit = this.onSubmit.bind(this)
      }
      
      
      render() {
        const name = this.props ...
  • React Base Fiddle (JSX)

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

    var Hello = React.createClass({
      render: function() {
        return <div>Hello {this.props.name}</div>;
      }
    });
    
    ReactDOM.render(
      <Hello name="World" />,
      document.getElementById('container')
    );
    
  • Complete Hello (old JS) #3 is the latest revision

    Hello!

    const Greeting = React.createClass({
    
    	render: function() {
    		const name = this.props.name
    		const message = this.props.message
    
    		return (
    			<div>
    				<h1>Hello, {name}!</h1>
    				<p>{message ...</p></div>
  • React Base Fiddle (JSX)

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

    const Hello = React.createClass({
    
      render: function() {
        return <h1>Hello from React!</h1>
      }
      
    })
    
    
    ReactDOM.render(
      <Hello />,
      document.getElementById('app')
    )