Closed axelthat closed 4 years ago
I have no problem with your code if I replace import { Fragment } from "vue-fragment";
with import { Plugin } from "vue-fragment";
and Vue.component("VFragment", Fragment);
with Vue.use(Plugin)
I don't know why it doesn't work as a component !
Yup confirmed it works. But it's weird it doesn't allow custom component id.
I have a dynamic component which renders html elements based on tag provided which is wrapped in a
v-fragment
component. However, when I change tag dynamically, for some reason,v-fragment
deletes the element.Here's the codesandbox element: https://codesandbox.io/s/wispy-field-8ksnv?fontsize=14&hidenavigation=1&theme=dark
Select different tag from the dropdown and you can see the element is deleted.