<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 十一、Ajax 組件的數據來源,通常是通過 Ajax 請求從服務器獲取,可以使用 componentDidMount 方法設置 Ajax 請求,等到請求成功,再用 this.setState 方法重新渲染 UI (查看?[demo11](https://github.com/ruanyf/react-demos/blob/master/demo11/index.html)?)。 > ~~~ > var UserGist = React.createClass({ > getInitialState: function() { > return { > username: '', > lastGistUrl: '' > }; > }, > > componentDidMount: function() { > $.get(this.props.source, function(result) { > var lastGist = result[0]; > if (this.isMounted()) { > this.setState({ > username: lastGist.owner.login, > lastGistUrl: lastGist.html_url > }); > } > }.bind(this)); > }, > > render: function() { > return ( > <div> > {this.state.username}'s last gist is > <a href={this.state.lastGistUrl}>here</a>. > </div> > ); > } > }); > > React.render( > <UserGist source="https://api.github.com/users/octocat/gists" />, > document.body > ); > ~~~ 上面代碼使用 jQuery 完成 Ajax 請求,這是為了便于說明。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>

                              哎呀哎呀视频在线观看