# vuejs/composition-api

Composition API plugin for Vue 2

Repository: https://github.com/vuejs/composition-api
Canonical: https://ross.abutalabs.com/products/composition-api
Homepage: https://composition-api.vuejs.org/
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2023-08-15T11:08:15+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2626, "days_push": 1114, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4181, forks 339 (observed 2026-08-28T04:08:38.403913+00:00)

## What it is
An official Vue 2 plugin that backports the Vue 3 Composition API (ref, reactive, lifecycle hooks, provide/inject) to Vue 2.6 and earlier. It is now in maintenance mode since Vue 2.7 includes the Composition API built in.

## Use cases
- use composition api in vue 2
- add ref and reactive to a vue 2.6 project
- prepare a vue 2 codebase for vue 3 migration
- replace mixins with composable functions in vue 2
- write vue components with typescript type inference

## When to choose
- you are stuck on Vue 2.6 or earlier and want Composition API style code
- you are incrementally migrating a Vue 2 app toward Vue 3

## When to avoid
- you are on Vue 2.7 or Vue 3, which have the API built in
- you are starting a new project today
- you need long-term support or new features

## Facets
- artifact type: library
- maturity: maintenance
- function: state-management, frontend-framework
- domain: frontend, web-development
- platform: browser, cross-platform
- tags: vue2, composition-api, reactivity, vue-plugin, typescript, nodejs

## Member repositories
- vuejs/composition-api (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:38.403913+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:22:39.914707+00:00, confidence not recorded.
  - readme: https://github.com/vuejs/composition-api (fetched 2026-08-28T04:08:38.403913+00:00, sha f0280e7a97c6)
  - homepage: https://composition-api.vuejs.org/ (fetched 2026-08-29T09:13:39.443247+00:00, sha d8a93f3fccc4)
  - site_page: https://vuejs.org/about/privacy (fetched 2026-08-29T09:13:39.463542+00:00, sha b11bfa0c69f1)
  - site_page: https://vuejs.org/about/faq (fetched 2026-08-29T09:13:39.455159+00:00, sha 8293fae6709c)
  - site_page: https://vuejs.org/about/team (fetched 2026-08-29T09:13:39.457074+00:00, sha d12b4549ec45)
  - site_page: https://vuejs.org/about/releases (fetched 2026-08-29T09:13:39.458624+00:00, sha 18a35dd0dcdb)
  - site_page: https://vuejs.org/about/community-guide (fetched 2026-08-29T09:13:39.460229+00:00, sha dd3533b7c274)
  - site_page: https://vuejs.org/about/coc (fetched 2026-08-29T09:13:39.461933+00:00, sha 0cfeb8b46044)
  - site_page: https://cn.vuejs.org/guide/extras/composition-api-faq (fetched 2026-08-29T09:13:39.465204+00:00, sha 1535b69e8f40)
  - site_page: https://v2.vuejs.org (fetched 2026-08-29T09:13:39.453287+00:00, sha 47d56d29e839)
- Data as of 2026-08-30T08:39:29.467469+00:00.
