Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

composition-api

> 前端框架
Open source

Composition API hooks for Nuxt 2.

702 stars0 likes0 views
WebsiteGitHub

About

Composition API hooks for Nuxt 2.

️ Nuxt Composition API

Composition API hooks for Nuxt 2

@nuxtjs/composition-api provides a way to use the Vue Composition API with Nuxt-specific features.


Nuxt Bridge has now been released in beta. It has full composition API support and it's strongly recommended to migrate from @nuxtjs/composition-api, if possible, by following the steps in the Bridge migration guide. Feedback welcome at https://github.com/nuxt-community/composition-api/discussions/585.


Features

  • Fetch: Support for the new Nuxt fetch() in v2.12+
  • ℹ️ Context: Easy access to router, app, store within setup()
  • ️ Head: Interact directly with your vue-meta properties within setup()
  • ✨ Automatic hydration: Drop-in replacement for ref with automatic SSR stringification and hydration (ssrRef)
  • SSR support: Allows using the Composition API with SSR
  • TypeScript: Written in TypeScript

Read Documentation

Contributors

Contributions are very welcome.

  1. Clone this repo

    bash
    git clone [email protected]:nuxt-community/composition-api.git
  2. Install dependencies and build project

    bash
    yarn
    # Compile library and watch for changes
    yarn watch
    # Start a test Nuxt fixture with hot reloading
    yarn fixture
    # Test
    yarn test

Tip: You can also use yarn link to test the module locally with your Nuxt project.

License

MIT License - Copyright © Daniel Roe

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptcomposition-apijavascriptnuxtnuxt-module

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架