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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects when reloading using lazy loading #7666

Closed
halvardssm opened this issue Oct 22, 2020 · 1 comment
Closed

Redirects when reloading using lazy loading #7666

halvardssm opened this issue Oct 22, 2020 · 1 comment

Comments

@halvardssm
Copy link

Version

5.2.0

Test Case

https://codesandbox.io/s/hungry-robinson-5w30d

Steps to reproduce

  1. go to codesandbox ^
  2. press link (goto about)
  3. reload the embeded browser
  4. notice how the page redirects you to home

Expected Behavior

Expected that the page does not redirect me back to the home page when reloading using lazy loading.

Actual Behavior

The page redirects me to the home page when reloading using lazy loading.

@halvardssm halvardssm changed the title Lazy loading routes fail with redirect Redirects when reloading using lazy loading Oct 22, 2020
@timdorr
Copy link
Member

timdorr commented Oct 22, 2020

Suspense needs to be outside of the Switch. Switch only works on the first level of children, so it's getting in the way.

@timdorr timdorr closed this as completed Oct 22, 2020
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