Skip to content

installQueryAdapter @vuqs/core ​

The app-level counterpart to provideQueryAdapter: provides the adapter on the Vue App rather than the current component instance.

Usage ​

Install the adapter during app setup. The Nuxt module registers it from a plugin.

ts
import { installQueryAdapter } from '@vuqs/core'
import { createVueRouterAdapter } from '@vuqs/core/adapters/vue-router'
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'

const app = createApp({})
const router = createRouter({ history: createWebHistory(), routes: [] })
app.use(router)
installQueryAdapter(app, createVueRouterAdapter({ router }))

Type ​

ts
function installQueryAdapter(app: App, adapter: QueryAdapter): void

Parameters ​

Return value ​

  • void
    • Installs the adapter on the Vue app.

Adapters.

Released under the MIT License. Inspired by nuqs.