React Base Fiddle (JSX)

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

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.js"></script>
<script src="https://fb.me/react-with-addons-0.14.6.js"></script>
<script src="https://fb.me/react-dom-0.14.6.js"></script>
<script src="https://facebook.github.io/react/js/jsfiddle-integration-babel.js"></script>

<div id="container">
    <!-- This element's contents will be replaced with your component. -->
</div>

JavaScript 1.7

const Form = React.createClass({
	getInitialState() {
  	return {
    	first_name: "John",
      last_name: "Doe",
    };
	},
  
  setFirstName(event) {
  	this.setState({first_name: event.target.value});
  },
  
  setLastName(event) {
  	this.setState({last_name: event.target.value});
  },
  
	handleSubmit(event) {
  	event.preventDefault();
    alert(JSON.stringify(this.state));
  },
  
	render() {
  	return (
    	<form onSubmit={this.handleSubmit}>
      	<input value={this.state.first_name} onChange={this.setFirstName} placeholder="First name"/>
      	<input value={this.state.last_name} onChange={this.setLastName} placeholder="Last name"/>
      	<button type="submit">Submit</button>
      </form>
    )
  }
});

ReactDOM.render(<Form />, document.getElementById('container'));