bug: ionic react does not support history@5.x
See original GitHub issueBug Report
Ionic version:
[ ] 4.x [x] 5.6.6
Current behavior:
In Ionic React, the nested route declared is not rendered when navigated to the corresponding url after upgrading to the latest version of ionic(5.6.6)
Expected behavior:
The nested route is rendered.
Steps to reproduce:
Please check this link for the code. This is from the example of nested navigation from the ionic docs, but the ionic packages have been updated to version 5.6.6 - https://stackblitz.com/edit/ionic-react-routing-bhuvg6?file=src/index.tsx
Related code:
App.tsx
<IonApp>
<IonReactRouter>
<IonRouterOutlet>
<Route path="/dashboard" render={props => <DashboardPage {...props} />} />
<Route exact path="/" render={() => <Redirect to="/dashboard" />} />
</IonRouterOutlet>
</IonReactRouter>
</IonApp>
DashboardPage.tsx
<IonRouterOutlet>
<Route exact path={match.url} component={UsersListPage} />
<Route path={`${match.url}/users/:id`} component={UserDetailPage} />
</IonRouterOutlet>
Ionic info:
Ionic:
Ionic CLI : 6.10.1 (C:\Users\justi\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/react 5.6.6
Capacitor:
Capacitor CLI : not installed
@capacitor/core : 2.4.7
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v12.19.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.8
OS : Windows 10
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
bug: ionic react does not support history@5.x #23294 - GitHub
React Router v6 will be using history@5.x , so I do still think we should support this in Ionic React. Can you try...
Read more >passing history props to IonReactRouter doesn't work as ...
I have a separate history.ts file. // history.js import { createBrowserHistory } from 'history'; export default createBrowserHistory({ ...
Read more >@ionic/core | Yarn - Package Manager
Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a single codebase ......
Read more >history.push() is undefined when using react Context (Ionic ...
Closed last year. UseHistory Hook while trying to push to another page says undefined while trying to programmatically navigate after the async ...
Read more >status bar dating app notification icons android
So here's the scenario: you grab your phone and don't see anything in the ... Found out by trial and error, dating the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you! Both the solutions worked for me.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.