vueuse / gesture

🕹 Vue Composables making your app interactive

Home Page:https://gesture.vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use in Nuxt3

Rysakov1986 opened this issue · comments

commented

How to use the vueuse/gesture component in Nuxt3?

Yeah...wondering the same thing here! :)

Add vueuse.gesture.ts to your plugins folder:

import { GesturePlugin } from '@vueuse/gesture'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(GesturePlugin)
})

And then you can e.g. import { useDrag } from '@vueuse/gesture' in your components.

@happy-turtle - Thank you! I'm still learning the ropes with Nuxt, and the solution is so easy...so thanks for humoring this newb (me) :)

Last question:

Is this server-side friendly, or only client-side? :)

@happy-turtle - Thank you! I'm still learning the ropes with Nuxt, and the solution is so easy...so thanks for humoring this newb (me) :)

Last question:

Is this server-side friendly, or only client-side? :)

No problem 😄 I am not sure, but we didn't run into problems using it with SSR.