This package has been deprecated

Author message:

This package has been renamed to @nuxtjs/composition-api

nuxt-composition-api
TypeScript icon, indicating that this package has built-in type declarations

0.11.0 • Public • Published

🏗️ Nuxt Composition API

Composition API hooks for Nuxt

nuxt-composition-api provides a way to use the Vue 3 Composition API in with Nuxt-specific features.

Note: the main aim is to allow experimentation and feedback before the final release of Nuxt 3. It is not recommended to use this package in production.

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

    git clone git@github.com:nuxt-community/composition-api.git
  2. 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

Package Sidebar

Install

npm i nuxt-composition-api

Weekly Downloads

54

Version

0.11.0

License

MIT

Unpacked Size

166 kB

Total Files

13

Last publish

Collaborators

  • danielroe