UNPKG

@react-hook/passive-layout-effect

Version:

A React hook that uses useEffect() on the server and useLayoutEffect() in the browser

7 lines (4 loc) 247 B
import React from 'react'; var usePassiveLayoutEffect = React[typeof document !== 'undefined' && document.createElement !== void 0 ? 'useLayoutEffect' : 'useEffect']; export default usePassiveLayoutEffect; //# sourceMappingURL=index.dev.mjs.map