react-conponent-hellocynthia

<!DOCTYPE html>
<html>
  <head>
    <script src="../../build/react.js"></script>
    <script src="../../build/react-dom.js"></script>
    <script src="../../build/browser.min.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script type="text/babel">
      var HelloMessage = React.createClass({
        render : function(){
          return <div>HELLO {this.props.name}</div>
        },

      });

      ReactDOM.render(
        <HelloMessage name='cynthia' />,
        document.getElementById('example')
      );
    </script>
  </body>
</html>

 

posted @ 2016-02-23 12:05  Cynthia娆墨旧染  阅读(221)  评论(0编辑  收藏  举报