Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with switch, dynamic segments and popstate #45

Closed
jeetiss opened this issue Jul 6, 2019 · 3 comments
Closed

Bug with switch, dynamic segments and popstate #45

jeetiss opened this issue Jul 6, 2019 · 3 comments

Comments

@jeetiss
Copy link
Collaborator

jeetiss commented Jul 6, 2019

Make codesandbox

And video with reproducing bug 馃

袟邪锌懈褋褜 褝泻褉邪薪邪 2019-07-07 胁 0 09 27

@molefrog
Copy link
Owner

molefrog commented Jul 8, 2019

Hey @jeetiss, thanks for reporting.
My guess is that this isn't connected to the popstate event, but rather to a fact that the rendering order of Switch and nested Route isn't deterministic: while normally the rendering order is as following:

  • Switch renders
  • Route renders

when an event happens outside of the event handling routine it could happen that the inner Route renders first and then the corresponding Switch component. I have one possible solution in mind, but I first need to reproduce this as a regression test.

@molefrog
Copy link
Owner

molefrog commented Jul 8, 2019

Closed via #46

@molefrog molefrog closed this as completed Jul 8, 2019
@molefrog
Copy link
Owner

molefrog commented Jul 8, 2019

@jeetiss Released the new version v2.1.1, feel free to upgrade!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants