-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: React fallback route causes flicker transition when routing between pages #24855
Comments
Hello @ashishbairwa thanks for moving this conversation into Github from our discord conversation. To help narrow the reproduction information, can you confirm if this accurately describes the problem as you understand it (based on your reproduction app)?
|
Yes, idea is to use the fallback route once. Right after that animation seems to break. |
Awesome, thanks! I've updated the title and see the same behavior on my end. We will capture this as a bug and prioritize in an upcoming sprint. |
Any progress on that? |
I have cloned and updated all the dependencies to check if it's resolved but i can still see flickering without even doing any thing. @sean-perkins |
It's been an year now. Do you guys have any update regarding this? @sean-perkins @liamdebeasi |
@ashish-yourphysio this is still an open issue in our backlog. The team has worked on many issues in the past year. Issues are prioritized by a variety of metrics. For community issues we weigh them on potential impact and upvotes (interest). The code is open source and freely available to provide assistance that can lead to this issue being resolved sooner. Additional debugging insight into the problematic code or a fix to the issue would be appreciated by both the team and the community. I understand this issue may be extremely critical to your application, but we are small team that tries to solve the largest sum problems across Ionic Framework (web components, Angular, React and Vue), Ionic docs (documentation and live examples) and the Stencil Framework Wrappers for DX for frameworks consuming our web components. We have improvements for routing in design, but it is unclear if they would have an immediate impact to this specific issue, without identifying the root cause to the transition flickering with the fallback route defined. |
I can confirm that the problem still exists. https://stackblitz.com/edit/aexcxb?file=src%2FApp.tsx (to try the page refreshes you can open the demo in full page) |
I can confirm this is still existing in Ionic 7. Any news? |
Okay i think i was able to fix it. Previously this is how we use router guards:
Simply put, we use custom component and either return the component or return a redirect depending on the authentication. Turns out flickering only happens on navigation if IonRoute is not a direct child of the IonRouterOutlet so what i did instead is something like:
where unauthenticatedRender:
This solved it for me! hope this can help |
You are using "exact" which is not a fallback route and this is why you don't have the exact problem, the issue still persists:( |
This is really serious bug. Any news? It's 2024 guys. It's been more than 2 years? |
Prerequisites
Ionic Framework Version
Current Behavior
Summary:
Context:
Here is how I declared that:
Navigation is working fine but there is an issue with how it’s animating, it ended up giving strange flickering while moving from one page to other page. One thing which I observed is when I refresh the page, flickering goes away and everything works as expected.
Here is the package.json:
I’m not sure what’s going wrong here. I tried all the other solutions mentioned on other posts as well but non of them working.
Expected Behavior
The default route should land on the target page and would not produce any flickering or black glitch while moving in the app
Steps to Reproduce
Please follow the git https://github.com/ashishbairwa/router-bug-ionic for the walkthrough.
Alternatively:
Code Reproduction URL
https://github.com/ashishbairwa/router-bug-ionic
Ionic Info
Ionic:
Ionic CLI : 6.18.1 (C:\Users\Ashish Bairwa\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/react 6.0.5
Capacitor:
Capacitor CLI : 3.3.3
@capacitor/android : 3.3.4
@capacitor/core : 3.3.3
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 1.5.0
System:
NodeJS : v16.13.1 (C:\Program Files\nodejs\node.exe)
npm : 6.14.14
OS : Windows 10
Additional Information
Video proofs:
https://youtu.be/kuEK9mkZx84
https://youtu.be/wg8vt6HvBlY
Linked issue in forum: https://forum.ionicframework.com/t/flickering-black-glitch-while-redirecting-to-some-other-page/220096/8
The text was updated successfully, but these errors were encountered: