react router官方文档 react-router不用Link怎么跳转路由?

react-router不用Link怎么跳转路由? 历史.pushState解决方案是使用以下代码来尝试:class test{constructor(props,context){Super(pro

react-router不用Link怎么跳转路由?

历史.pushState

解决方案是使用以下代码来尝试:

class test{

constructor(props,context){

Super(props,上下文)这个路由器

= 上下文路由器

}

}

测试.上下文类型

= {

需要PropTypes.object.isRequired

react-router-redux在react-router成为4.0后是不是不需要了?

路由功能可用于Redux应用程序,它可以通过路由器来实现。

Redux和reactrouter将分别是数据和URL的来源。在大多数情况下,最好将它们分开,除非您需要时间旅行和回放操作来触发URL更改。1、