0%

React Router with MobX Doesn't Re-render Using History.push()

Issue Description

Issue happened with react-router-dom and MobX. Tryed to use history.push() for navigating after an action conducted. The problem is only updating the urls but components are not re-rendering.

Solution

Used <BrowserRouter> as router component in application. Followed by offical document, need to replace it with <Router history={history}> because MobX was used to manage state, where history is return by syncHistoryWithStore() from mobx-react-router.