Could Vue create a "VDOM-less" or Svelte-like mode? #8955
Replies: 4 comments
-
Another option here, of course, is that Vue doesn't directly create this mode, but provides the APIs to create a |
Beta Was this translation helpful? Give feedback.
-
In Vue, it's called |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Just for your information, Vue VNodes do support the It's new in Vue 3. According to the migration guide, lifecycle events worked only for components in Vue 2. |
Beta Was this translation helpful? Give feedback.
-
Recently I came across petite-vue. Unfortunately, it has no issue tracker and doesn't seem to receive regular updates, but I find it a really compelling project.
At work and amongst colleagues, we often have a lot of discussions around pros / cons of Vue vs. Svelte. Svelte's tiny runtime, incredible performance, and direct DOM updates make it really attractive. However, Vue's ecosystem is larger with more targeted third-party components. Otherwise, interestingly, Vue SFCs and Svelte components are really not that different.
I would love to see
petite-vue
s VDOM-less mode be an option for mainstream Vue. Right now, petite-vue seems mostly designed for in-browser compilation without a build step. But because it has really compelling features that Vue doesn't have and Svelte has, such as direct lifecycle events for mounted elements, and "components" returning real DOM elements, like Svelte.I would love to see Vue offer a "Svelte-mode" which, like Svelte, offers a tiny runtime and easy DOM access without ref callbacks, but would support the rest of the Vue ecosystem. Basically the best of Vue + the best features of
petite-vue
.Beta Was this translation helpful? Give feedback.
All reactions