awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
vuejs avatar

vuejs/composition-api

0
View on GitHub↗
4,184 stars·340 forks·TypeScript·MIT·23 viewscomposition-api.vuejs.org↗

Composition Api

This project is a reactivity plugin that brings the Composition API and reactive state management from Vue 3 to Vue 2 applications. It serves as a component logic organizer and a system for encapsulating reactive state and functions into reusable utilities.

The plugin enables the use of composable functions to share stateful logic across components without relying on mixins. It provides a structure based on plain variables and functions to facilitate automatic type inference and editor autocomplete. Additionally, it includes a provider-based dependency injection system for sharing data and functions across a component tree.

The system covers the management of reactive state, computed properties, and watchers, alongside the ability to hook into component lifecycles. It allows for the integration of third-party stateful libraries into the native reactivity system and supports prefetching data on the server.

The project is written in TypeScript.

Features

  • Logic Organizers - Provides a system to group related functions and state by logical concern within Vue 2 components.
  • Vue Composition API Plugins - Brings the Vue 3 Composition API and reactive state management capabilities to Vue 2 applications.
  • Stateful Composables - Offers reusable functions that encapsulate reactive state and lifecycle hooks for efficient component composition.
  • Compositional Logic Organizations - Groups related data and methods into functional blocks to improve code reuse and maintainability.
  • Dependency Injection Providers - Implements a provider-based dependency injection system to share data and functions across a component tree.
  • Dependency Injection - Implements a function-based dependency injection system to share data and functions across a component tree.
  • Logic Reuse Patterns - Provides patterns for sharing stateful functionality across components using composable functions.
  • Separation of Concerns - Implements a design pattern to decouple component logic from fixed option blocks, improving separation of concerns.
  • Stateful Logic Encapsulation - Provides a system for extracting repetitive state management and business logic into standalone reusable composable functions.
  • Component Lifecycle Hooks - Executes custom logic during component rendering, updates, or removal via lifecycle hooks.
  • Component Lifecycle Management - Manages the creation, updates, and destruction of components throughout their operational lifecycle.
  • Component Lifecycle Hooks - Provides methods to execute specific logic at defined stages of a component's existence, such as mounting.
  • Lifecycle Hooks - Implements mechanisms to execute custom logic during specific phases of a component's mounting and unmounting process.
  • Component-Based State Management - Manages component state and watchers using imported functions instead of static component options.
  • Proxy-Based Reactivity - Uses JavaScript Proxy objects to intercept data changes and automatically trigger UI updates.
  • Reactive State Management - Provides functions to create reactive variables and computed properties for tracking application state.
  • Bundle Size Optimization - Reduces the final bundle size by removing instance proxies to allow for more efficient minification.
  • Automatic Type Inferences - Leverages plain variables and functions to enable automatic determination of types for better editor autocomplete.
  • Code Block Grouping - Clusters related variables and functions together in the source code to ensure cohesive execution and organization.
  • Static Type Inference - Provides a structure using plain variables and functions to enable native TypeScript static type inference.
  • Component Type Inferences - Enables automatic derivation and validation of types for component options and properties.
  • Component Option Translations - Converts traditional object-based component options into a single setup function for improved organization and type inference.
  • Concern-Based Logic Grouping - Organizes related code by functional purpose to reduce file navigation and simplify refactoring.
  • Instance Proxy Bypasses - Enables more efficient minification and smaller production bundle sizes by accessing variables directly instead of through component instance proxies.
  • Structural Typing and Inference - Leverages plain variables and functions to enable native TypeScript structural typing and automatic inference for better autocomplete.
  • Dependency Injection for UI - Provides a provider-based mechanism for passing data and functions across a component tree without manual prop drilling.
  • Bundle Size Optimizers - Shrinks production output by compiling templates as inlined functions to remove instance proxies.

Star history

Star history chart for vuejs/composition-apiStar history chart for vuejs/composition-api

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does vuejs/composition-api do?

This project is a reactivity plugin that brings the Composition API and reactive state management from Vue 3 to Vue 2 applications. It serves as a component logic organizer and a system for encapsulating reactive state and functions into reusable utilities.

What are the main features of vuejs/composition-api?

The main features of vuejs/composition-api are: Logic Organizers, Vue Composition API Plugins, Stateful Composables, Compositional Logic Organizations, Dependency Injection Providers, Dependency Injection, Logic Reuse Patterns, Separation of Concerns.

What are some open-source alternatives to vuejs/composition-api?

Open-source alternatives to vuejs/composition-api include: didi/mpx — MPX is a cross-platform framework designed to build applications for multiple mini-program ecosystems and the web from… vuejs/vue — Vue is a progressive, component-based JavaScript framework designed for building reactive user interfaces and… reactjs/react.dev — React is a JavaScript library for building user interfaces through the composition of modular, self-contained… ygs-code/vue — This project is a technical study guide and architectural analysis of the Vue.js framework. It serves as an… flightjs/flight — Flight is a JavaScript component framework and DOM interactivity library used to map behavioral logic to HTML nodes.… vobyjs/voby — Voby is a signal-based framework for building reactive user interfaces. It utilizes fine-grained observables to track…

Open-source alternatives to Composition Api

Similar open-source projects, ranked by how many features they share with Composition Api.
  • didi/mpxdidi avatar

    didi/mpx

    3,905View on GitHub↗

    MPX is a cross-platform framework designed to build applications for multiple mini-program ecosystems and the web from a single codebase. It utilizes a static transpilation pipeline to transform source code into platform-specific bundles, employing a single-file component system that encapsulates templates, logic, and styles. The framework provides a reactive state management system that automatically synchronizes application data with the user interface through computed properties and watchers. The project distinguishes itself through a robust build-time toolchain that supports sub-package p

    JavaScript
    View on GitHub↗3,905
  • vuejs/vuevuejs avatar

    vuejs/vue

    209,900View on GitHub↗

    Vue is a progressive, component-based JavaScript framework designed for building reactive user interfaces and single-page applications. It centers on a declarative template system that transforms HTML into efficient render functions, allowing developers to organize complex interfaces into isolated, reusable units that synchronize automatically with application state. The framework distinguishes itself through a dependency-tracking reactivity system that monitors data access during rendering to trigger precise updates. It provides a flexible architecture that supports both incremental adoption

    TypeScriptframeworkfrontendjavascript
    View on GitHub↗209,900
  • reactjs/react.devreactjs avatar

    reactjs/react.dev

    11,765View on GitHub↗

    React is a JavaScript library for building user interfaces through the composition of modular, self-contained components. It employs a declarative programming model where developers describe the desired visual state, and the library automatically manages the underlying document updates and state synchronization. By utilizing a virtual representation of the document, it calculates and applies minimal changes to the browser, ensuring efficient rendering even in complex applications. The library distinguishes itself through a sophisticated scheduling system that manages rendering work in increme

    JavaScriptdocumentationjavascriptreact
    View on GitHub↗11,765
  • ygs-code/vueygs-code avatar

    ygs-code/vue

    7,321View on GitHub↗

    This project is a technical study guide and architectural analysis of the Vue.js framework. It serves as an educational resource for understanding the implementation of a reactive framework, providing source code analysis and architectural visualizations to explain the internal workings of the Model-View-ViewModel pattern. The project focuses on the mechanics of reactive framework implementation, specifically how dependency tracking, getters, and setters are used to synchronize state with a user interface. It includes detailed examinations of the virtual DOM and the process of reconciling ele

    JavaScript
    View on GitHub↗7,321
  • See all 30 alternatives to Composition Api→