2017-10-21 8 views
0

ユーザーがリンクをクリックすると、ユーザーはチェックアウトページに誘導されます。別のページにリダイレクトした後に店舗価値を還元する

selectSlot(slot){ 
    window.location = `/checkout/${slot.target.value}` 
} 

私のアプローチでは、reduxストア値は保持されません。 どうすればこれらの値を保持できますか?

は、ここでの目的のためにreact-router-domから私はLinkを使用していますルータの定義

<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> 
+0

どのReact Routerのバージョンを使用していますか? –

答えて

0

であり、私のために動作します。あなたはそれについて読むことができますhere

関連する問題