【问题标题】:React router - find current route in flux store反应路由器 - 在通量存储中查找当前路线
【发布时间】:2017-09-29 04:16:07
【问题描述】:

我正在使用带有通量的反应路由器。有没有办法知道商店的当前路线?我尝试使用this.props.location.pathname,但它始终未定义。

【问题讨论】:

    标签: reactjs react-router reactjs-flux react-native-router-flux


    【解决方案1】:

    从上一个版本 (v4) 开始,您可以像 Actions.state 一样简单地访问您的应用导航状态,使用 Actions.currentScene 来获取当前场景的名称。

    您可以在 GitHub 上查看更多详细信息https://github.com/aksonov/react-native-router-flux

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-11
      • 2019-06-23
      • 2016-06-05
      • 1970-01-01
      相关资源
      最近更新 更多