Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

nuxt-community/composition-api

Folders and files

NameName
Last commit message
Last commit date
Apr 12, 2024
Mar 31, 2023
Nov 11, 2024
Apr 12, 2024
Apr 12, 2024
Apr 27, 2020
Oct 11, 2020
Apr 12, 2024
Jun 25, 2020
May 8, 2020
Feb 11, 2021
Feb 18, 2021
Apr 12, 2024
Apr 27, 2020
Apr 27, 2020
Sep 11, 2023
Apr 12, 2024
Apr 12, 2021
Aug 7, 2020
Dec 5, 2024
Apr 27, 2020
Aug 1, 2022
May 21, 2021
Mar 31, 2023
Mar 5, 2021
Apr 12, 2024
Dec 5, 2024

Repository files navigation

🏗️ 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

    git clone [email protected]: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