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
Current behavior:
Despite changing the URL, the view doesn't rerender.
Another error is that I never go to useIonViewDidEnter. I have this in the Home page :
Expected behavior:
I wish it would change page without any problem.
Steps to reproduce:
You can :
git clone https://github.com/florianchevallier/ionic-react-test
cd ionic-react-test
npm i
ionic serve
UPDATE: Also found out my nested path (/tab2/details as seen above) didn't work under the Switch, I had to move it outside so it was siblings with Switch
Same problem here. Nesting <Switch> element inside <IonRouterOutlet> did work. Using it <IonSplitPane>. And as noted above, change animations are gone and annoying "flicker" effect happens when switching between pages.
I also bumped into the same problem.
I use tabs and a component with onClick=history.push('/page/1).
Initially, this component didn't render the new page when I clicked on it (like in the video).
I then added the <Switch> element inside <IonRouterOutlet> and this workes but, when I click on 2 tabs, the browser stops rendering the pages.
I checked out your repo, and it seems the issue when using the IonRouterOutlet is that your pages didn't have a IonPage as their main component. Each page in a outlet needs to have the IonPage as its parent.
Also, there seems to be some duplication of IonContent tags in your pages (some in the page, and some in the layout), there should only be one IonContent per page.
Going to close this as it doesn't seem as the original issue is a bug in the framework.
For the others on the thread, if the above doesn't help, please open a new issue and provide a reproduction of the issue in a github repo.
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.
Activity
florianchevallier commentedon Mar 6, 2020
After doing some investigations, replacing the
IonRouterOutletwith aSwitchfromreact-router-dom, all seems to work.TaylorClay commentedon Mar 13, 2020
Just to throw it out there, in my case, I was not able to simply replace the
IonRouterOutletwithSwitch. I had to nestSwitchwithinIonRouterOutlet.Without the presence of
IonRouterOutlet, I received the error:See snippet below.
UPDATE: Also found out my nested path (
/tab2/detailsas seen above) didn't work under theSwitch, I had to move it outside so it was siblings withSwitchntarricone commentedon Apr 13, 2020
Replacing IonRouterOutlet for Switch seems to have fixed the issue for me. However I´m not using tabs...
I wonder why is this happening... Because I´m doing another route change and it was working with the IonRouterOutlet
MachineMakesNoise commentedon Apr 20, 2020
Same problem here. Nesting
<Switch>element inside<IonRouterOutlet>did work. Using it<IonSplitPane>. And as noted above, change animations are gone and annoying "flicker" effect happens when switching between pages.Edit: proper format to show tags in comment.
MrWillTurner commentedon Apr 26, 2020
I also bumped into the same problem.
I use tabs and a component with
onClick=history.push('/page/1).Initially, this component didn't render the new page when I clicked on it (like in the video).
I then added the
<Switch>element inside<IonRouterOutlet>and this workes but, when I click on 2 tabs, the browser stops rendering the pages.elylucas commentedon Apr 29, 2020
Hi @florianchevallier
Sorry about the delay in taking a look at this.
I checked out your repo, and it seems the issue when using the
IonRouterOutletis that your pages didn't have aIonPageas their main component. Each page in a outlet needs to have the IonPage as its parent.Also, there seems to be some duplication of
IonContenttags in your pages (some in the page, and some in the layout), there should only be oneIonContentper page.Going to close this as it doesn't seem as the original issue is a bug in the framework.
For the others on the thread, if the above doesn't help, please open a new issue and provide a reproduction of the issue in a github repo.
Thanks!
ionitron-bot commentedon May 29, 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.