4 ms·
Anyone here jump ship to Vue3 w/ it's composition API? I feel like Vue has the best of both worlds by offering a functional paradigm (composition api) while sti
by whalesalad 4y ago
Anyone here jump ship to Vue3 w/ it's composition API? I feel like Vue has the best of both worlds by offering a functional paradigm (composition api) while still supporting the classical object-based options API. I am slowly transitioning object/options components over to the composition approach in a continuous improvement approach. The ability to do that at my own leisure has been quite nice.
I'm inclined to think Vue is the better framework, but React has a larger ecosystem.
(Not intending to start a flame war here)
- FallDownTS 4y agoThe reactivity system in react is certainly "outdated" when compared to Vue, Svelte, Solid, or pretty much any newer framework. But it's just as you said, the larger ecosystem does have its benefits. There are a few libraries like Framer motion, that don't have equivalent support in other frameworks.
- ojkelly 4y agoIt’s all cyclical. Before React two-way-binding of data, known today as Signals, was the way we did things. Angular is probably the best example from the pre-react time of that. React came along with a philosophy of one-way-binding also known as unidirectional data flow. I’ve stuck with it because I think it enables much better local reasoning, and more predictable outcomes. Neither are outdated. I’d wager the most performance critical use cases would benefit from signals, things like tldraw. But unless you’re doing something which needs to paint every single frame (ignoring animation/transitions), the extra overhead and mental load required by Signals is excessive. It’s overly complex and harder to reason about. With no disrespect to Vue, Svelte, Solid, etc, they feel outdated in the way Angular does.
- evnp 4y agoYes, we're using Vue 3 and composition-style components over at https://radiopaper.com https://radiopaper.com. My only gripe is that Vue's standard templates can't be typed as thoroughly as JSX can (IME - after mixed experiences with Vetur/VTI[1]), but we've been gradually migrating everything to TSX via render functions[2] and finding it perfectly capable. Added bonus is an ease of composition of template code – small local-use components can easily be split out within the same file for readability, in contrast with Vue SFC's. Vue even has true "function components" now! [3] (nice to have in really minimal cases) [1] https://vuejs.github.io/vetur/guide/vti.html https://vuejs.github.io/vetur/guide/vti.html [2] https://vuejs.org/guide/extras/render-function.html https://vuejs.org/guide/extras/render-function.html [3] https://vuejs.org/guide/extras/render-function.html#functional-components https://vuejs.org/guide/extras/render-function.html#function...
- The5thElephant 4y agoI love Vue 3, but 99% of the reason I love it is the SFCs and not using JSX/TSX most of the time. Vue can't optimize render functions as well as it can optimize templates, and templates are significantly more approachable for people like me who come from the design/HTML/CSS world and want to contribute to the codebase (especially since most front-end devs coming from JS world suck at HMTL/CSS). Is typing really the main issue there? Working in render functions and TSX is sooooo much more clunky for doing the same basic things, and you lose all the nice benefits of Vue's SFCs and things like built-in class array logic.