đī¸ Nuxt Composition API
Composition API hooks for Nuxt
@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 Nuxtfetch()
in v2.12+âšī¸ Context: Easy access torouter
,app
,store
withinsetup()
đēī¸ Head: Interact directly with yourvue-meta
properties withinsetup()
⨠Automatic hydration: Drop-in replacement forref
with automatic SSR stringification and hydration (ssrRef
)đ SSR support: Allows using the Composition API with SSRđĒ TypeScript: Written in TypeScript
Contributors
Contributions are very welcome.
-
Clone this repo
git clone [email protected]:nuxt-community/composition-api.git
-
Install dependencies and build project
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