@react-hook/resize-observer@2.0.0 does not work in SSR
Closed this issue · 1 comments
mateuszmichi commented
Describe the bug
When using @react-hook/resize-observer without polyfill in SSR, the server rendering will fail as the default polyfill is refering to window.ResizeObserver
To Reproduce
Steps to reproduce the behavior:
- Create base NextJS app (with pages routing)
- Install @react-hook/resize-observer@2.0.0
- Use it in the SSR page.
Expected behavior
The SSR part is not crushing during the build or the docs should mention that package can no longer be used with SSR without polyfill.
jaredLunde commented
Yeah, this is obviously the case. It's your responsibility to polyfill if you need it.