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路由器? –