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
// useEffect runs after paint, so we briefly see the pre-hydration scroll position and then it snaps back.
319
-
// to remedy this, we can use the useLayoutEffect hook. However, useLayoutEffect can only run on the client so we run useEffect on the server to stop it complaining.
318
+
319
+
/**
320
+
* useEffect runs after paint, so we briefly see the pre-hydration scroll position and then it snaps back.
321
+
* to remedy this, we can use the useLayoutEffect hook which fires before the browser repaints the screen.
322
+
* However, useLayoutEffect can only run on the client so we run useEffect on the server to stop it complaining.
0 commit comments