Composition API
Last updated
What is Composition API?
Vue offers many approaches for how to write components, including the "Composition API", which is most commonly used via "Script Setup". This approach is based around pulling in low level atomic functions used by Vue's reactivity engine. By composing these low level functions together, you can craft your own system for writing components. One feature this allows for is extending reactivity outside of components. This means you can extract your custom functions for reuse in multiple components. When reusing reactive logic, your functions are called "composables".
Free resources to learn Composition API
- Official docsTypeScript with Composition API
- Official docsComposition API FAQ
- Official docsComposition API
- ArticleVue 3 Composition API
- FeedExplore top posts about Vue.js
More in stage 4: API Styles
Composition API: common questions
Can I learn Composition API in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Composition API in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Composition API tutorial for beginners?
It is lesson 16 of 84 in the free Vue roadmap, in stage 4, API Styles. If you are new to Vue, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.