bvaughn / react-resizable-panels

https://react-resizable-panels.vercel.app/
MIT License
3.87k stars 135 forks source link

UseLayoutEffect on PanelResizeHandle.ts (SSR) #293

Closed damaafer closed 7 months ago

damaafer commented 7 months ago

Usage of useLayoutEffect on this component cause warning in SSR https://github.com/bvaughn/react-resizable-panels/blob/a4821fce0d893fdbbb1f67c945050b0d323ad810/packages/react-resizable-panels/src/PanelResizeHandle.ts#L100

Can you fix this with useIsomorphicLayoutEffect?

bvaughn commented 7 months ago

Yuck. My bad. I intended to use my little useIsomorphicLayoutEffect wrapper everywhere but forgot in this case. I should probably add a lint rule.

bvaughn commented 7 months ago

Fix released as 2.0.6; sorry for the hassle


❤️ → ☕ givebrian.coffee