-
Notifications
You must be signed in to change notification settings - Fork 272
feat: add unmount to wrapper #78
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
Conversation
Hi! Thanks for the PR. We aren't looking to expand the API much right; but maintain the API from VTU beta. Is there a specific reason why you need this functionality in your app? If you are looking to contribute, we had a Ideally, we should create an issue to discuss new features before adding them. Don't let that stop you - feel free to create one for some discussion, if you think this feature is valuable. |
isn't I thought the In v3 the We can have a |
Right, I didn't know they had renamed that hook. Makes sense. In this case it's maintaining an existing API so I think this PR makes sense. I don't think we need a deprecation warning; we are targeting Vue 3 exclusively, where there is no Looks good to me. I will look for one more approval and merge this up. If you want, you can mark |
# Conflicts: # src/mount.ts # src/vue-wrapper.ts
Just merged with master, but I have a question, when we use findComponent it will return a new instance of VueWrapper, my question is do we allow to const c = wrapper.findComponent({ ref: 'refChild' })
c.unmount() If we allow should we unmount the root as well or only the component? |
I see 0 use case for unmounting a vue wrapper found via |
add
unmount
to the wrapperNamed
unmount
to be inline with vue3Not throwing exception when you
unmount
multi times, because vue3 only warnshttps://github.com/vuejs/vue-next/blob/a51b05267231fb1770d6fc727bc276475c21d27f/packages/runtime-core/src/apiCreateApp.ts#L233-L239