UNPKG

@react-hook/passive-layout-effect

Version:

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

1 lines 467 B
{"version":3,"file":"index.mjs","sources":["../../src/index.tsx"],"sourcesContent":["import React from 'react'\n\nconst usePassiveLayoutEffect =\n React[\n typeof document !== 'undefined' && document.createElement !== void 0\n ? 'useLayoutEffect'\n : 'useEffect'\n ]\n\nexport default usePassiveLayoutEffect\n"],"names":["usePassiveLayoutEffect","React","document","createElement"],"mappings":"yBAEMA,EACJC,EACsB,oBAAbC,eAAuD,IAA3BA,SAASC,cACxC,kBACA"}