Vue 3 is backwards-compatible and the new composition API is entirely optional, you can keep using the old syntax if you'd like while getting a solid performance boost.
I really like the approach they've taken with Vue 3. You can use the more powerful code re-use and composition tools if you want and you get an experience more similar to React hooks using the composition API, but if you want the more simple Vue approach that many ppl came to like Vue for that's still available as well.
The composition API scales better. If you had ever had to reuse a data/method/lifecycle/watch combination of any kind, you know it's not exactly simple to do with the options API. The composition API allows you to extract the logic into a single function you can call in any component.
but if you want the more simple Vue approach that many ppl came to like Vue for that's still available as well.
Yeah, but for how long? Now there's two APIs to learn, and you can just bet composition will win out. When the original RFC was made, Evan You wanted to completely replace the options API - until everyone kicked up a stink and he reversed that decision. It's hard for me not to be weary of options API (the BEST part of Vue) when the creator originally wanted it gone. :/
For as long as Vue 3 exists the Options API will be available since removing it would be a backwards breaking change and become Vue 4. There's no sense in worrying about it if you just want to keep using Vue 3 which will be available and stable for a really long time. Hell you can keep using Vue 2 for the next decade if you want, it's feature rich and feature complete and will remain that way indefinitely.
11
u/ejfrodo Jun 08 '21 edited Jun 08 '21
I guess you haven't really tried to use Vue 3 :)
Vue 3 is backwards-compatible and the new composition API is entirely optional, you can keep using the old syntax if you'd like while getting a solid performance boost.
I really like the approach they've taken with Vue 3. You can use the more powerful code re-use and composition tools if you want and you get an experience more similar to React hooks using the composition API, but if you want the more simple Vue approach that many ppl came to like Vue for that's still available as well.