You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
timwuhaotian
changed the title
useLayoutEffect seldomly creating long render time with React's renderToPipeableStream
useLayoutEffect seldomly creating long render time with React's renderToPipeableStream in SSR
May 8, 2024
The
onShellReady
andonAllReady
both hits > 4 seconds 1 out of 10 times with usinguseWindowSize
anduseOrientation
hook90% of the time, the time is < 100ms
after replace them with local implementation which uses
useEffect
, the long render time does not happen again.https://react.dev/reference/react-dom/server/renderToPipeableStream
It generates the warning as well:
The text was updated successfully, but these errors were encountered: