@hooks/mount
v0.1.0
Published
React hook to execute callback on component mount
Downloads
4
Readme
🎒 @hooks/mount
React hook to execute callback on component mount
Install
npm i @hooks/mount
Usage
useMount
useMount(callback: () => void, hook: (effect: EffectCallback, deps?: DependencyList) => void = useEffect)
Parameters
callback: () => void
Function to execute.
hook: (effect: EffectCallback, deps?: DependencyList) => void = useEffect
Hook to use, defaults to useEffect.