Edit in JSFiddle

var Counter = React.createClass({
	getInitialState: function() {
    return {
    	counter: 0
    };
  },
  render: function() {
    return <div>
    		<h2>{this.props.name}</h2>
    		{this.state.counter}
      </div>;
  }
});

ReactDOM.render(
  <Counter name={'Counter'} />,
  document.getElementById('container')
);
<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>