<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 下載 如果你不準備用npm,你可以下載包含著預編譯過的React和React Dom 的起步套件。 [Download Starter Kit 0.14.3](https://facebook.github.io/react/downloads/react-0.14.3.zip) #在線編譯 ~~~ <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Hello React!</title> <script src="build/react.js"></script> <script src="build/react-dom.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> </head> <body> <div id="example"></div> <script type="text/babel"> ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('example') ); </script> </body> </html> ~~~ #獨立文件 Your React JSX code can live in a separate file. Create the following src/helloworld.js. ~~~ ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('example') ); ~~~ Then reference it from helloworld.html: `<script type="text/babel" src="src/helloworld.js"></script>` Note that some browsers (Chrome, e.g.) will fail to load the file unless it's served via HTTP. # 離線轉換 First install the Babel command-line tools (requires npm): ~~~ npm install --global babel-cli npm install babel-preset-react ~~~ Then, translate your src/helloworld.js file to plain JavaScript: `babel --presets react src --watch --out-dir build` Note: >If you are using ES2015, you will want to also use the babel-preset-es2015 package. 離線轉換后的html ~~~ <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Hello React!</title> <script src="build/react.js"></script> <script src="build/react-dom.js"></script> <!-- No need for Babel! --> </head> <body> <div id="example"></div> <script src="build/helloworld.js"></script> </body> </html> ~~~ # React.Dom ## ReactDOM.render(vm, node) # React ## ReactElement.createElement = function (type, config, children) ## React.createClass ## React.createFactory ## React.DOM.p # React使用注意的問題 - visualDom里的元素事件onClick 里傳參不能用this, clickHandle里獲取 屬性和狀態 用this.props 和this.state - ``React has been successfully running for ${seconds} seconds.`;` es6的模板 - this.refs.modal 通過refs屬性來查找替換后的原生dom ## React組件的生命周期
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看