Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//fb.me/react-with-addons-0.14.3.js"></script>
<script src="//fb.me/react-dom-0.14.3.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var ValidateComponent = 
React.createClass({
  propTypes: {
    name: React.PropTypes.string.isRequired,
    age: React.PropTypes.number.isRequired
  },
  render(){
    return(
    <div> age: {this.props.age} name: {this.props.name} </div>
  );
  }
});
 React.render(<ValidateComponent age={2} name='Peter'/>, document.body)
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers