Repository navigation
ResizeObserver #17618
Answered
by
lfades
jonasgroendahl
asked this question in
Help
ResizeObserver
#17618
|
I'm trying to use a library that uses ResizeObserver API. Specifically it's a React select component library. Everytime I refresh the page, I get the following error: How can I fix this issue in Nextjs? I suppose the problem this API is not available on the server but I couldn't find any docs that explains what to do |
Answered by
lfades
Oct 5, 2020
Replies: 1 comment 1 reply
|
As you said, The solution here is to use |
1 reply
Answer selected by
lfades
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



As you said,
ResizeObserveris a browser API that is not available in Node.js, so when Next.js tries to server-render the page it will fail.The solution here is to use
next/dynamicand load the component only in the browser 👍 .