Created
May 3, 2023 07:51
-
-
Save 8mist/28a360fe398fb5368c119f44d970c939 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
const IS_SERVER = typeof window === 'undefined' | |
export const useIsomorphicLayoutEffect = IS_SERVER | |
? React.useEffect | |
: React.useLayoutEffect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment