Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <script src="https://fb.me/react-with-addons-0.14.7.min.js"></script>
  <script src="https://fb.me/react-dom-0.14.7.min.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <h2>State</h2>
  <div id="app">
    
  </div>
</body>
</html>
 
class Hello extends React.Component {
  constructor(){
    super();
    this.state = {
        message: "world!"
    }
  }
  
  render() {
    return (
      <div>
        Hello {this.state.message}
      </div>
    );
  }
}
ReactDOM.render(<Hello />, document.getElementById('app'));
Output 300px

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

Dismiss x
public
Bin info
rkotzepro
0viewers