<small id='e3rJo'></small><noframes id='e3rJo'>

    <i id='e3rJo'><tr id='e3rJo'><dt id='e3rJo'><q id='e3rJo'><span id='e3rJo'><b id='e3rJo'><form id='e3rJo'><ins id='e3rJo'></ins><ul id='e3rJo'></ul><sub id='e3rJo'></sub></form><legend id='e3rJo'></legend><bdo id='e3rJo'><pre id='e3rJo'><center id='e3rJo'></center></pre></bdo></b><th id='e3rJo'></th></span></q></dt></tr></i><div id='e3rJo'><tfoot id='e3rJo'></tfoot><dl id='e3rJo'><fieldset id='e3rJo'></fieldset></dl></div>
    <tfoot id='e3rJo'></tfoot>
  • <legend id='e3rJo'><style id='e3rJo'><dir id='e3rJo'><q id='e3rJo'></q></dir></style></legend>
      <bdo id='e3rJo'></bdo><ul id='e3rJo'></ul>

      1. connect 和 withRouter 问题

        connect and withRouter issue(connect 和 withRouter 问题)
        <i id='AA6XL'><tr id='AA6XL'><dt id='AA6XL'><q id='AA6XL'><span id='AA6XL'><b id='AA6XL'><form id='AA6XL'><ins id='AA6XL'></ins><ul id='AA6XL'></ul><sub id='AA6XL'></sub></form><legend id='AA6XL'></legend><bdo id='AA6XL'><pre id='AA6XL'><center id='AA6XL'></center></pre></bdo></b><th id='AA6XL'></th></span></q></dt></tr></i><div id='AA6XL'><tfoot id='AA6XL'></tfoot><dl id='AA6XL'><fieldset id='AA6XL'></fieldset></dl></div>

        <legend id='AA6XL'><style id='AA6XL'><dir id='AA6XL'><q id='AA6XL'></q></dir></style></legend>
          <tbody id='AA6XL'></tbody>
        • <bdo id='AA6XL'></bdo><ul id='AA6XL'></ul>
        • <tfoot id='AA6XL'></tfoot>

          <small id='AA6XL'></small><noframes id='AA6XL'>

                • 本文介绍了connect 和 withRouter 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在我的项目中使用 Redux 和 React.我在 App.js 中有一些路由.我还在我的项目中使用 react-redux 中的连接功能.为了防止更新阻塞问题,我通常以这种方式包装我的组件

                  I am using Redux and React for my project. I have some Routes in App.js. I also use the connect function in react-redux in my project. To prevent update blocking issue, I usually wrapped my component in this way

                  withRouter(connect(mapStateToProps, mapDispatchToProps)(App)),
                  

                  但是,如果我更改了 withRouter 的顺序并连接它不起作用:

                  However, If I changed order of withRouter and connect it doesn't work:

                  connect(mapStateToProps, mapDispatchToProps)(withRouter(App))
                  

                  我有 console.log App.js 中的道具.它已经接收到位置和历史道具.我正在弄清楚为什么顺序很重要背后的理论?

                  I have console.log the props in App.js. It already receives location and history props. I am figuring out the theory behind why the order does matter ?

                  推荐答案

                  可以参考一下这个https://reacttraining.com/react-router/core/api/withRouter,它清楚地表明它不能反过来工作

                  Could you refer to this https://reacttraining.com/react-router/core/api/withRouter, it clearly says that it doesn't work the other way around

                  这篇关于connect 和 withRouter 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Pause youtube video, youtube api(暂停 youtube 视频,youtube api)
                  Youtube iframe api not triggering onYouTubeIframeAPIReady(Youtube iframe api 未触发 onYouTubeIframeAPIReady)
                  How can I stop a video with Javascript in Youtube?(如何在 Youtube 中停止使用 Javascript 的视频?)
                  How to call Greasemonkey#39;s GM_ functions from code that must run in the target page scope?(如何从必须在目标页面范围内运行的代码中调用 Greasemonkey 的 GM_ 函数?)
                  How do you mute an embedded Youtube player?(如何使嵌入式 Youtube 播放器静音?)
                  How to get number of video views with YouTube API?(如何使用 YouTube API 获取视频观看次数?)
                    <bdo id='UcLZo'></bdo><ul id='UcLZo'></ul>
                  • <legend id='UcLZo'><style id='UcLZo'><dir id='UcLZo'><q id='UcLZo'></q></dir></style></legend>
                  • <tfoot id='UcLZo'></tfoot>

                        <small id='UcLZo'></small><noframes id='UcLZo'>

                              <tbody id='UcLZo'></tbody>

                          1. <i id='UcLZo'><tr id='UcLZo'><dt id='UcLZo'><q id='UcLZo'><span id='UcLZo'><b id='UcLZo'><form id='UcLZo'><ins id='UcLZo'></ins><ul id='UcLZo'></ul><sub id='UcLZo'></sub></form><legend id='UcLZo'></legend><bdo id='UcLZo'><pre id='UcLZo'><center id='UcLZo'></center></pre></bdo></b><th id='UcLZo'></th></span></q></dt></tr></i><div id='UcLZo'><tfoot id='UcLZo'></tfoot><dl id='UcLZo'><fieldset id='UcLZo'></fieldset></dl></div>