7 lines
213 B
JavaScript
7 lines
213 B
JavaScript
|
import { useLayoutEffect, useEffect } from 'react';
|
||
|
import { isBrowser } from './is-browser.mjs';
|
||
|
|
||
|
const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
|
||
|
|
||
|
export { useIsomorphicLayoutEffect };
|