Version: v3.6.0

@rooks/use-did-mount#

componentDidMount hook for React#


Build Status

Installation#

npm install --save @rooks/use-did-mount

Importing the hook#

import useDidMount from "@rooks/use-did-mount"

Usage#

function Demo() {
useDidMount(function(){
console.log("mounted")
});
return null
}
render(<Demo/>)

Arguments#

ArgumentTypeDescription
callbackfunctionfunction to be called on mount

Codesandbox Examples#

Basic Usage#

Last updated on by imbhargav5