bug: Ionic React with redirect on tab with nested route no longer works
See original GitHub issueI have a demo repo here with full description and video. Simple commit history. Code diff for changes made to tabs starter here
Bug Report
Ionic version:
[x] 4.11.6 (introduced here) [x] 4.11.7 [x] 4.11.8 [x] 4.11.9 [x] 4.11.10 (regressed further to where page does not even display)
Demo:
Current behavior:
- Correct: TAB_WITH_REDIRECT is displayed after steps to reproduce.
- Incorrect: TAB_WITHOUT_REDIRECT is displayed after steps to reproduce.
Expected behavior: (Multiple Scenarios)
- TAB_WITH_REDIRECT is displayed after steps to reproduce.
- TAB_WITH_REDIRECT is displayed after steps to reproduce.
Steps to reproduce:
- Navigate via address bar to the root url of TAB_WITH_REDIRECT. By clicking, switch to a TAB_WITHOUT_REDIRECT. By clicking, switch back to TAB_WITH_REDIRECT. Observe TAB_WITH_REDIRECT is displayed.
- Navigate via address bar to the url of a TAB_WITHOUT_REDIRECT. Switch by clicking, to the tab TAB_WITH_REDIRECT. Switch by clicking, back to TAB_WITHOUT_REDIRECT. Switch by clicking, back to TAB_WITH_REDIRECT. Observe TAB_WITH_REDIRECT is displayed.
Related code: See repo
Ionic info:
Ionic:
Ionic CLI : 5.4.15 (/Users/adamduren/.nvm/versions/node/v10.14.1/lib/node_modules/ionic)
Ionic Framework : @ionic/react 4.11.10
Utility:
cordova-res (update available: 0.9.0) : 0.6.0
native-run (update available: 0.3.0) : 0.2.8
System:
NodeJS : v10.14.1 (/Users/adamduren/.nvm/versions/node/v10.14.1/bin/node)
npm : 6.13.2
OS : macOS Catalina
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Problem with IonTabs on a nested route - Ionic React
The problem was that my default tab (the one in the redirect) isn't the leftmost tab. The default tab was the middle one....
Read more >React Ionic Tabs nested Routes Animación no works
In App. tsx, use the render method prop instead of nesting the Home component (e.g. <Route path="/home" render={() => <Home />} /> instead...
Read more >React Ionic Tabs Nested Routes Animation Not Working
In order for a redirect to occur the from path needs to be an exact match to the navigated URL. Multiple Route Redirects....
Read more >Angular Router: Child Routes, Auxiliary Routes, Master Detail
The first thing to know about the new router is that by default it uses the HTML5 History API. This means that routing...
Read more >Ionic Routing and Navigation Guide - Fireship
If migrating from Ionic 3, be aware that some familiar Ionic navigation elements have been deprecated in version 4. While they work, it...
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
@elylucas just upgraded to v5 and it appears to work as expected. Thank You!
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.