Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use in Nuxt3 #21

Open
Rysakov1986 opened this issue May 23, 2023 · 4 comments
Open

Use in Nuxt3 #21

Rysakov1986 opened this issue May 23, 2023 · 4 comments

Comments

@Rysakov1986
Copy link

How to use the vueuse/gesture component in Nuxt3?

@armenr
Copy link

armenr commented Dec 21, 2023

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

@happy-turtle
Copy link

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.

@armenr
Copy link

armenr commented Jan 4, 2024

@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
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants