@nuxtjs/composition-api
🏗️ Nuxt Composition API
Composition API hooks for Nuxt 2
@nuxtjs/composition-apiprovides 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,storewithinsetup() - 🗺️ Head: Interact directly with your
vue-metaproperties withinsetup() - ✨ Automatic hydration: Drop-in replacement for
refwith 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 git@github.com: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
Related Packages
Fast and small library built on top of the native Vue.js API, providing a safe a...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.34.0 | ^2.7.16 | MIT | |
| 0.33.1 | ^2.7.8 | MIT | |
| 0.33.0 | ^2.7.4 | MIT | |
| 0.32.0 | ^2 | MIT | |
| 0.31.0 | ^2 | MIT | |
| 0.30.0 | ^2 | MIT | |
| 0.29.3 | ^2 | MIT | |
| 0.29.2 | ^2 | MIT | |
| 0.29.0 | ^2 | MIT | |
| 0.28.0 | ^2 | MIT | |
| 0.27.0 | ^2 | MIT | |
| 0.26.0 | ^2 | MIT | |
| 0.25.2 | ^2 | MIT | |
| 0.25.1 | ^2 | MIT | |
| 0.25.0 | ^2 | MIT | |
| 0.24.7 | ^2 | MIT | |
| 0.24.6 | ^2 | MIT | |
| 0.24.5 | ^2 | MIT | |
| 0.24.4 | ^2 | MIT | |
| 0.24.3 | ^2 | MIT | |
| 0.24.2 | ^2 | MIT | |
| 0.24.1 | ^2 | MIT | |
| 0.24.0 | ^2 | MIT | |
| 0.23.4 | ^2 | MIT | |
| 0.23.3 | ^2 | MIT | |
| 0.23.2 | ^2 | MIT | |
| 0.23.1 | ^2 | MIT | |
| 0.23.0 | ^2 | MIT | |
| 0.22.4 | ^2 | MIT | |
| 0.22.3 | ^2 | MIT |
Showing the latest 30 of 62. See every release on npm
Pre-releases (3)
| Version | Released | Vue | License |
|---|---|---|---|
| 0.22.5-beta.0 | ^2 | MIT | |
| 0.21.0-vite-1 | ^2 | MIT | |
| 0.21.0-vite-0 | ^2 | MIT |