Initial release
This commit is contained in:
commit
d4d1215874
16967 changed files with 4075897 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
import { useEffect, useLayoutEffect } from 'react';
|
||||
|
||||
function useIsomorphicLayoutEffect(callback, deps) {
|
||||
// eslint-disable-next-line
|
||||
if (typeof window === 'undefined') return useEffect(callback, deps);
|
||||
return useLayoutEffect(callback, deps);
|
||||
}
|
||||
|
||||
export { useIsomorphicLayoutEffect };
|
||||
Loading…
Add table
Add a link
Reference in a new issue