javascript - how to dispatch an redux action when refreshing the page or directly enter the URL with react-router -
i using react-router build assets management app. app should provide dedicated asset editing page every individual asset, in route component have this:
<router history={browserhistory}> <route path="/" component={app}> <route path="home" component={home}/> <route path="/assets/:assetsid" component={assetspage}/> </route> </router> when user on home page, can click on assets bring assets page. click fire async action fetch assets api , update assets page.
the problem flow that, when user in specific assets page , clicks refresh, or directly enters specific assets url. action not fired, , page not populated data
how should solve problem ?
Comments
Post a Comment