<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <script type='text/javascript' src="./dist/React.js"></script>
    <script src="./test/react.js"></script>
    <script src="./test/react-dom.js"></script>
    <script src="./lib/babel.js"></script>
    <script type='text/babel'>
window.onload = function(){
   class App extends React.Component {
      constructor(props) {
        super(props);
        this.state = {
          path: "111"
        };
      }
      componentWillUpdate(){
        this.setState({
          path: '222'
        }, function(){
          console.log('====')
        })
      }
      render() {
        return <div><span>{{this.state.path}}</span></div>;
      }
    }
    ReactDOM.render(<App />, document.getElementById('example'))
   
   
    


}
    </script>
</head>

<body>

    <div>这个默认会被清掉</div>
    <div id='example'></div>


</body>

</html>