Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//fb.me/react-0.10.0.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
/** @jsx React.DOM */
var myObj = {a: 1};
var App = React.createClass({
  handleClick: function(){
    this.replaceState(myObj);
  },
  render: function(){
    return (<div>
      <div onClick={this.handleClick}>
        click here to replaceState
      </div>
      <h3>state === myObj is {"" + (this.state === myObj)}</h3>
    </div>);
  }
});
React.renderComponent(<App />, document.body);
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers