The problem I have is that redirect does not load the page. It is not the same as using navigate in react router dom
if a do:
return ( <Redirect push={true} to="/dashboard"/>)
it does loads the url but not the component, so the component doesn’t appear, until the browser is refreshed (manually)
This is the App.tsx (with just 2 components to make it easy to show you)
<IonApp>
<IonReactRouter>
<IonSplitPane contentId="main" when="(min-width: 4096px)">
<Menu setIsReg={setIsReg} />
<IonRouterOutlet id="main">
<Route path="/tab2" component={Tab2} exact={true} />
<Route path="/dashboard" component={dashboard} exact={true} />
</IonRouterOutlet>
</IonSplitPane>
</IonReactRouter>
</IonApp>
But in react router dom there is not this issue, whit this (for example) :
<Navigate to="/dashboard" replace={true} />
And in App.tsx, with this:
return (
<BrowserRouter>
<Switch>
<Route path="/" exact component={SignIn} />
<Route path="/dashboard" component={Dashboard} isPrivate />
</Switch>
</BrowserRouter>
);
It’s runs ok.