question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Ionic React with redirect on tab with nested route no longer works

See original GitHub issue

I 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:

  1. Correct: TAB_WITH_REDIRECT is displayed after steps to reproduce.
  2. Incorrect: TAB_WITHOUT_REDIRECT is displayed after steps to reproduce.

Expected behavior: (Multiple Scenarios)

  1. TAB_WITH_REDIRECT is displayed after steps to reproduce.
  2. TAB_WITH_REDIRECT is displayed after steps to reproduce.

Steps to reproduce:

  1. 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.
  2. 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adamdurencommented, Feb 21, 2020

@elylucas just upgraded to v5 and it appears to work as expected. Thank You!

0reactions
ionitron-bot[bot]commented, Jul 16, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found