loading...
Cover image for Quick tip: Vue 2 Options API vs Vue 3 Composition Api

Quick tip: Vue 2 Options API vs Vue 3 Composition Api

vuetraining profile image VueTraining.net Updated on ・1 min read

Vue 2's Options API (left)
vs
Vue 3's Composition API (right)

They look pretty similar here, but Composition API really shines when things get complex.

Remember to use ".value" for the ref, and to return any variables or functions you'll be using in the template!

Alt Text

Discussion

pic
Editor guide