Skip to content

Commit

Permalink
Link to useLayoutEffect gist in a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Mar 19, 2019
1 parent daeda44 commit cbad144
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/react-dom/src/server/ReactPartialRendererHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,7 @@ export function useLayoutEffect(
'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.',
'UI. See https://fb.me/react-uselayouteffect-ssr for common ways to fix this.',
);
}

Expand Down

0 comments on commit cbad144

Please sign in to comment.