Search code examples
node.jsreactjsexpressreact-routerreact-router-redux

Push() location, change URL in address bar but it doesn't render component


I use express as a nodeJs web application server and react-redux-router to push new location to the browser. After pushing the address in the address bar from localhost:3000/admin change to localhost:3000 but it keeps on the same page.

I use dispatch(push('/')) to execute the job.

redux-logger : enter image description here

[Update]

I used this solution but it didn't work for me


Solution

  • Wrapping components with withRouter solved my problem.