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

[BUG] When client side changes routes old routes got called #234

Open
alvinkl opened this issue Oct 28, 2019 · 1 comment
Open

[BUG] When client side changes routes old routes got called #234

alvinkl opened this issue Oct 28, 2019 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@alvinkl
Copy link
Contributor

alvinkl commented Oct 28, 2019

Describe the bug
Old unmounted route component got called even after the route has already changed

To Reproduce
Steps to reproduce the behavior:

  1. Go to some route with render that requires data from getInitialProps
  2. Change to other route

Expected behavior
Old unmounted route component doesn't get called

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Mac OSX High Sierra]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
We can mitigate this issue by checking if certain object is undefined or not

@alvinkl alvinkl added the bug Something isn't working label Oct 28, 2019
@alvinkl alvinkl added the help wanted Extra attention is needed label Oct 28, 2019
@alvinkl
Copy link
Contributor Author

alvinkl commented Nov 29, 2019

I'm currently working on this one, I think there is a slight problem of how Maleo passes data from AppContext to _App which renders the route, that causes several rerenders due to the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants