0
当用户单击链接时,它将引导用户进入结帐页面。重定向到另一个页面后保留重新存储值
selectSlot(slot){
window.location = `/checkout/${slot.target.value}`
}
我的方法不会保留redux商店的价值。 我该如何保留这些值?
这里是路由器定义
<Provider store={store}>
<ConnectedRouter history={history}>
<Router>
<Switch>
<Route exact path="/" component={MainLayout} />
<Route exact path="/index.html" component={MainLayout} />
<Route path="/checkout" component={CheckoutLayout} />
<Route component={NotFound}/>
</Switch>
</Router>
</ConnectedRouter>
</Provider>
你正在使用哪个版本的React路由器? –