Using this library with Nextjs app router #161
element-software
started this conversation in
Ideas
Replies: 1 comment 6 replies
-
Sorry, my post is not to raise a bug or anything but more a discussion on the 'correct' way of doing things. I have been able to workaround this by using dynamic imports in Nextjs without making changes to hakit/components. Create a file which imports the hakit component, put This works for me and doesn't give the |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've successfully used this great package with Nextjs 14 and the app router, but recently have experienced an issue with the Weather card, since it's not a client component. Nextjs 14 requires you to declare
use client
at the top of the file, and since the Weather card doesn't have it, I get awindow is not defined
error, specifically in theleaflet
package.Is there a possibility this could be considered when creating components, especially since everything uses hooks? I'm going to fork the repo and try it out to see if my theory is correct. This would apply to pretty much all components.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions