useUpdateEffect
FunctionuseUpdateEffect(effect: any, deps: any): voidReact effect hook that ignores the first invocation (e.g. on mount). The signature is exactly the same as the useEffect hook.
example:
const Component = ({ value }) => {
useUpdateEffect(() => {
console.log('update')
}, [value])
return <div />
@param effect
@param depsParameters
| Parameter | Type |
|---|---|
effect | any |
deps | any |
Returns
void