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
Did something change for v5? Am I missing something?
If I go back to 4.10.1, pushing a path to history works fine, in v5 it gives me a blank page. If then I reload the browser, only then it shows the page.
index.js
import { Route, Router, Switch } from 'react-router-dom';
import Home from '../../views/home/home';
import Login from '../../views/login/login';
import routerHistory from './routerHistory';
import { Provider } from 'react-redux';
import store from '../redux/store';
import GlobalStyle from '../styles/styles'
//Routes
export default function Routes() {
return (
<Provider store={store}>
<Router history={routerHistory}>
<Switch>
<Route path="/" exact component={Home} />
<Route path="/login" component={Login}/>
</Switch>
<GlobalStyle />
</Router>
</Provider>
);
}
routerHistory.js
import { createHashHistory } from 'history';
export default createHashHistory();
in some file:
import routerHistory from '../../core/infrastructure/routerHistory';
...
routerHistory.push("/");
...
The text was updated successfully, but these errors were encountered:
I'm having the same issue. Can you provide your package.json? Might be some incompatibility with react-router-dom or redux. I'll let you updated if I find anything.
Did something change for v5? Am I missing something?
If I go back to 4.10.1, pushing a path to history works fine, in v5 it gives me a blank page. If then I reload the browser, only then it shows the page.
index.js
routerHistory.js
in some file:
The text was updated successfully, but these errors were encountered: