Swiper with nextJS 15 #7861
Replies: 1 comment
-
I found a solution that worked for me. This might be helpful for someone in the future. Solution: The file now looks like this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm working on a mono repo project with a slider component in the UI packages. Everything works for the story book.
But can't say the same in my next app.
I'm using next 15 and this error is thrown when using the slider component in my next application:
Error: You're importing a component that needs
useState
. This React hook only works in a client component. To fix, mark the file (or its parent) with the"use client"
directive.Which points to this file - /ui/dist/index.mjs
I have tried making the Slider component a client component by adding 'use client' to it.
Thanks for your assistance.
Justice
Beta Was this translation helpful? Give feedback.
All reactions