You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redirect doesn't work. URL is changing but component did not mounting.
Last workable version of history:
"history": "^4.10.1",
src/utils/history.js
import { createBrowserHistory } from 'history';
export default createBrowserHistory();
src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from 'react-router-dom';
import { Provider } from 'react-redux';
import history from './utils/history';
import store from './store';
import App from './App';
ReactDOM.render(
<Provider store={store}>
<Router history={history}>
<App />
</Router>
</Provider>,
document.getElementById('root'),
);
Most likely due to the change of history.listen() - but v5 has a lot of breaking changes that will make react-router stop working. See #811 for all breaking changes. You'll have to downgrade to history 4.10, I'm afraid.
Packages versions:
Issue description:
Redirect doesn't work. URL is changing but component did not mounting.
Last workable version of history:
src/utils/history.js
src/index.js
src/App.js
The text was updated successfully, but these errors were encountered: