Version: v3.6.0

@rooks/use-isomorphic-effect#

A hook that resolves to useEffect on the server and useLayoutEffect on the client.#

Build Status

Installation#

npm install --save @rooks/use-isomorphic-effect

Importing the hook#

import useIsomorphicEffect from "@rooks/use-isomorphic-effect"

Usage#

function Demo() {
useIsomorphicEffect( () => {
console.log("Effect")
} ,[]);
return null
}
render(<Demo/>)
Last updated on by imbhargav5