01-引入方式 发表于 2018-05-03 | 分类于 前端-05-react | 1. 引入方式:1234567891011新版本需要注意的地方:1,js文件引用换成最新的<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react-dom.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>2,<script type="text/jsx"> 换成 <script type="text/babel">3, var tipE = React.findDOMNode(this.refs.tip);换成 var tipE = ReactDOM.findDOMNode(this.refs.tip);4,React.render 换成 ReactDOM.render 2. 单独引入jsx<script type="text/babel" src="src/helloworld.js"></script> 3.demo1234567891011121314<!DOCTYPE html><html> <head> <meta charset="UTF-8" /> <title>Hello React!</title> <script src="js/build/react.js"></script> <script src="js/build/react-dom.js"></script> <script src="js/build/browser.min.js"></script> </head> <body> <div id="example"></div> <script type="text/babel" src="js/16-demo.jsx"> </script> </body></html>