You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is related to: vuejs/vue-router#2606
Providing a way to destroy the app or mark the SSR request as complete (maybe on $ssrContext) is a potential fix to this problem, though maybe not the best one.
To recap:
A memory leak happens when the router-view is programmed to appear conditionally, and the component matching the view has a beforeRouteEnter guard and a callback is passed to it's next(...) method (e.g. next(vm => {})).
This will cause vue-router to poll every 16ms until the router-view materializes.
In a typical SSR application an instance of the app is created per request, which means the router-view will never appear, causing infinitely recursing poll methods.
What does the proposed API look like?
A potential fix to this would be to detect when the app is destroyed in vue-router's poll method, and allow the user to destroy the app that they created in entry-server.js.
Uh oh!
There was an error while loading. Please reload this page.
What problem does this feature solve?
This issue is related to: vuejs/vue-router#2606
Providing a way to destroy the app or mark the SSR request as complete (maybe on
$ssrContext
) is a potential fix to this problem, though maybe not the best one.To recap:
A memory leak happens when the
router-view
is programmed to appear conditionally, and the component matching the view has abeforeRouteEnter
guard and a callback is passed to it'snext(...)
method (e.g.next(vm => {})
).This will cause
vue-router
to poll every 16ms until therouter-view
materializes.In a typical SSR application an instance of the app is created per request, which means the
router-view
will never appear, causing infinitely recursing poll methods.What does the proposed API look like?
A potential fix to this would be to detect when the app is destroyed in
vue-router
'spoll
method, and allow the user to destroy the app that they created inentry-server.js
.A simplified example:
The text was updated successfully, but these errors were encountered: