Vue 2's Options API (left)
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!
Top comments (0)