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

fix: initial load renders routes immediately #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ekscentrysytet
Copy link

This fix addresses the issues reported earlier:
#129
#136

I've created a sandbox example where issue can be reproduced. Click here. If you navigate to some nested page route by directly hitting it in browser tab (e.g. https://6ixom.csb.app/page/subpage) you'll see all nested components are rendered immediately where's their promises are not resolved yet.

@AVVS Hope this makes things clear

@AVVS
Copy link
Member

AVVS commented Apr 22, 2020

thanks for the PR!
based on the change I don't clearly see the logic here. First time the component renders we have a state variable that is set to false and then we set it to true. Could you explain the solution in a bit more detail?

@AVVS AVVS requested a review from aleksxor April 22, 2020 16:20
@ekscentrysytet
Copy link
Author

@AVVS so the fix is that initally we don't need to render anything unless matched route components async connect promises are resolved. Issue now is that Route is rendered immediately which renders route matched components immediately rather than being rendered after promises are resolved.

@ekscentrysytet
Copy link
Author

any updates?

@finom
Copy link

finom commented Aug 10, 2020

Is the project dead?

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

Successfully merging this pull request may close these issues.

3 participants