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: Navigation to the same route glitches

See original GitHub issue

I’ve been able to get the transitions working by navigating between different pages. For example navigating from home to an article detail page.

Now I have the following use case: There are some related articles on the article detail page and when the user clicks on one of these articles it should navigate to the same route again (articleDetail -> articleDetail) but with different parameters (different article item).

To get this to work I set a unique key for this page:

this.props.navigation.navigate({
    routeName: 'ArticleDetail',
    params: {
        item,
    },
    key: `article-detail-${item.id}`,
});

When doing this the transitions don’t start and both pages overlap each other for a small amount of time.

I think the scene.key should be integrated somewhere to avoid fromRoute and toRoute to be the same while they are not when it comes to the transition.

Thanks!

Update: Here is a expo snack that shows the issue: https://snack.expo.io/HkkzasfU7

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chrfalchcommented, Sep 3, 2018

Hi @bsnelder (and @ZiedBeta). After investigating and reproducing this issue I’ll try to explain what happens and what causes your issue.

What happens when doing this transition is that both screen1 and screen2 register their shared transition elements as the from and to routes in the current transition. When you try to transition further, the same transition element in screen2 should now be the from (instead of to) route from screen2 -> screen3 - this won’t work and I haven’t found an easy solution for this yet.

I’ll put this on the list as a feature request and will continue to investigate. Also feel free to fork the repo and see if you can find a solution and submit a PR.

1reaction
chrfalchcommented, Aug 20, 2018

I can see the problem now, thanks for the repro. Will take a look and see if I can find a solution for this. Thanks for the repro!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v5] Navigation glitch after first entering stack · Issue #6651
I presume the "glitch" you're describing is just the screen transition animation of the stack.
Read more >
Navigator 2.0 Route Transition Bug - flutter - Stack Overflow
I am stuck with a bugged animation when I try to set a Navigator 2.0 on part of the screen. My App Layout...
Read more >
Top 5 Ways to Fix Google Maps Keeps Rerouting on Android ...
Google Maps keeps rerouting you while navigating on Android or iPhone? Here are some troubleshooting tips that will help.
Read more >
List of Unused Glitches - ZeldaSpeedRuns
List of Unused Glitches. On this page you will find unused but interesting glitches. All glitches not on any other pages are welcome....
Read more >
Google Maps not showing route: Learn how to solve this issue ...
Numerous clients have been confronting issues with Google Maps. These are the aftereffects of specific bugs and glitches numerous applications ...
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