Skip to content

Where is the cloneVNode function? #437

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

Closed
ddenev opened this issue Jul 11, 2020 · 2 comments
Closed

Where is the cloneVNode function? #437

ddenev opened this issue Jul 11, 2020 · 2 comments
Assignees

Comments

@ddenev
Copy link

ddenev commented Jul 11, 2020

Evan You says we can use the cloneVNode function - vuejs/core#815 (comment) - but I cannot find it in the composition API.

Tried import { cloneVNode } from 'vue' and import { cloneVNode } from '@vue/composition-api' but none works.

I'm using Vue 2 with the @vue/composition-api package so what is the proper way to import the cloneVNode function?

Thank you.

@antfu antfu added the misalignment Misalign with the latest RFC label Jul 11, 2020
@pikax pikax self-assigned this Jul 13, 2020
@pikax
Copy link
Member

pikax commented Jul 13, 2020

That's quite low-level API, I've created a draft PR, but the implementation is hacky since vue 2.x doesn't expose this internals in a good way.

Even if it gets ported there will be some limitations.

@pikax
Copy link
Member

pikax commented Jul 14, 2020

cloneVNode and other low level APIs are not part of the composition-api, so they won't be supported here.

Also the vdom of v2 is different than v3 making the port of this api not ideal.

@pikax pikax closed this as completed Jul 14, 2020
@pikax pikax removed the misalignment Misalign with the latest RFC label Jul 14, 2020
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 a pull request may close this issue.

3 participants