@nhost/vue
v2.6.7
Published
Nhost Vue library
Downloads
1,425
Readme
Nhost Vue
The Nhost Vue client exports a Nhost client that can be installed as a Vue plugin, and composables that make it easier to work with Nhost in your Vue app.
Documentation
Installation
Install the Nhost Vue client together with GraphQL:
# With npm
npm install @nhost/vue graphql
# With Yarn
yarn add @nhost/vue graphql
Initializing
Initialize a single nhost
instance, and install it as a plugin in your Vue app.
import { createApp } from 'vue'
import { NhostClient } from '@nhost/vue'
import App from './App.vue'
const nhost = new NhostClient({
subdomain: '<Your Nhost project subdomain>',
region: '<Your Nhost project region>'
})
createApp(App).use(nhost).mount('#app')