DEV Community

Discussion on: Composition api or Options api?

Collapse
 
the_one profile image
Roland Doda

Hi Fyodor thank you for your comment. Glad to see that you liked the article.

I would say that they "soft-deprecating" the Options API. In the docs is mentioned that they don't plan deprecating it but if you read the docs throughout you will see that Options API is discouraged.

πŸ‘‰ In Vue 2, Options api was fine for full application but now in Vue 3 they say that options api is for low-complexity apps or without using a bundler.

πŸ‘‰ They also say that for new projects choose Composition api only and using it, it's better performance wise because you "shave-off" some kilobytes.

πŸ‘‰ Also, Code written in Composition API and script setup is also more efficient and minification-friendly than Options API equivalent.

So how can you win against the arguments to use CompA when you are in a team? You simply can't.

That's why I have switched totally to CompA.

If someone would ask me what is the best way to use Vue 3, I would say that it is Composition API with Typescript because I see that Vue team pushes us towards this way.

Collapse
 
clockwiser profile image
clockwiser

I feel something is wrong with the vue development team. They should think again why vue is so popular against react.