Skip to content

Commit cbad144

Browse files
committed
Link to useLayoutEffect gist in a warning
1 parent daeda44 commit cbad144

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/react-dom/src/server/ReactPartialRendererHooks.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,7 @@ export function useLayoutEffect(
392392
'useLayoutEffect does nothing on the server, because its effect cannot ' +
393393
"be encoded into the server renderer's output format. This will lead " +
394394
'to a mismatch between the initial, non-hydrated UI and the intended ' +
395-
'UI. To avoid this, useLayoutEffect should only be used in ' +
396-
'components that render exclusively on the client.',
395+
'UI. See https://fb.me/react-uselayouteffect-ssr for common ways to fix this.',
397396
);
398397
}
399398

0 commit comments

Comments
 (0)