Skip to content
Discussion options

You must be logged in to vote

You could use next/dynamic with ssr: false to import the component that uses jQuery (or window). https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr

next/dynamic only works with React components, so you can put your logic within a component and then use ssr: false when you import that component.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@guddukmr786
Comment options

Answer selected by jamesmosier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants