ResizeObserver issues with Server Side Rendering and older browsers
See original GitHub issueThe new ResizeObserver
features cause some issues when using Server Side Rendering or older browsers, as it does not exist in those environments.
One use can be manually disabled using the resizeObserverConfig
, but this one can not:
https://github.com/clauderic/dnd-kit/blob/eb6d4c95227631d8e05bfb31685886458f995c93/packages/core/src/hooks/utilities/useDragOverlayMeasuring.ts#L34
It can likely be solved by checking if the ResizeObserver is supported before using it.
This affects @dnd-kit/core@5.0.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Server side rendering support #73 - juggle/resize-observer
Describe the bug. The package causes the build system to crash when used in server-side rendering app. To Reproduce.
Read more >ResizeObserver - Web APIs | MDN
The ResizeObserver interface reports changes to the dimensions of an Element's content or border box, or the bounding box of an SVGElement.
Read more >Next.js and ag-grid - ResizeObserver.observe error while ...
Solution: Turns out the issue was not ag-grid conflicting with Next.js but rather ag-grid conflicting with React 18.
Read more >Server Side Rendering fallback for old browsers
According to our design principles, we prioritize for modern browsers and look only for usability in older browsers, not feature parity.
Read more >Resize Observer | Can I use... Support tables for ... - CanIUse
Method for observing and reacting to changes to sizes of DOM elements. Usage % of. all users, all tracked, tracked desktop, tracked mobile....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Working on it, will ship a patch release
Works great, thanks @clauderic