I get a warning due to the use of useLayoutEffect in this library during SSR using Next.js:
Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.
at $4b51bd7b90b9da8b$export$2e2bcd8739ae039 (/Users/erikmuller/cnapp/node_modules/react-resizable-panels/dist/react-resizable-panels.js:29:63)
Ah, that's fair. PanelGroup doesn't have enough information to render panels correctly until they've mounted and registered but I could use a default flex: 1 1 auto style for the initial render.
Hi @bvaughn, thanks for this amazing library!
I get a warning due to the use of
useLayoutEffect
in this library during SSR using Next.js:Is it possible to use something like
useIsomorphicLayoutEffect
instead ofuseLayoutEffect
?