We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was reading about how Vue implements web components here:
When the element's disconnectedCallback is invoked, Vue will check whether the element is detached from the document after a microtask tick. If the element is still in the document, it's a move and the component instance will be preserved; If the element is detached from the document, it's a removal and the component instance will be unmounted.
When the element's disconnectedCallback is invoked, Vue will check whether the element is detached from the document after a microtask tick.
disconnectedCallback
This seems really sensible. I think we can do the same thing.
The text was updated successfully, but these errors were encountered:
fix: preserve state if component disconnects then immediately reconnects
b328b67
Fixes #312
Vue implementation:
https://github.com/vuejs/core/blob/ce064a172b3b5bcb096b4984fe0c1a54177ac9c0/packages/runtime-dom/src/apiCustomElement.ts#L207-L215
https://github.com/vuejs/core/blob/ce064a172b3b5bcb096b4984fe0c1a54177ac9c0/packages/runtime-core/src/scheduler.ts#L53-L59
Sorry, something went wrong.
fix: preserve state if component disconnects then immediately reconne…
5a8fc19
…cts (#313) Fixes #312
Successfully merging a pull request may close this issue.
I was reading about how Vue implements web components here:
This seems really sensible. I think we can do the same thing.
The text was updated successfully, but these errors were encountered: