-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 route components remounting rather than being updated when props change #440
Conversation
…the wrapped component to the slot
✅ Deploy Preview for kitbag-router ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@pleek91, just wanna make sure I fully understand this change. So RouterView is basically back to it's original form at least in the template. However, that
|
@stackoverfloweth And we could clear the definitions out but I think it makes more sense to just keep them indefinitely. |
@stackoverfloweth foe the rejections I think for now we should keep them as is otherwise transitions won't work going between routes and rejections. |
Description
This approach builds on what I learned in #439 and fixes the remounting of components when params change. What this does differently is it uses a factory to create a wrapper around the route's component that handles the prop binding, suspense, and async updates. And it stores that wrapper in a store so that it can be reused.