Package Exports
- @react-hook/passive-layout-effect
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@react-hook/passive-layout-effect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@react-hook/passive-layout-effect
A React hook that uses useEffect()
on the server and useLayoutEffect()
in the browser
Installation
npm i @react-hook/passive-layout-effect
yarn add @react-hook/passive-layout-effect
Usage
import usePassiveLayoutEffect from '@react-hook/passive-layout-effect'
const F = ({foo, bar}) => {
// Used the same way useEffect() and useLayoutEffect() are
usePassiveLayoutEffect(() => {}, [foo, bar])
}
Full credit to
LICENSE
MIT