Vue 3 Composition API
Plans from $25/month

This lesson is for members. Join us?

Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.

Vue Composition API Setup Method

In this lesson, we learn the basics of using the Vue Composition API setup method. setup is executed before the component is created, once the props are resolved, and serves as the entry point for composition APIs.

In order to expose things from the setup method and to the other component options (data, methods, computed, etc) as well as to the template, we need to return them from the setup method.

Links