useDidUpdate
Hook that triggers the effect callback on updates
lifecycle
necessary
test coverage
Last changed: last month
Installation
Library
CLI
Manual
typescript
import { useDidUpdate } from '@siberiacancode/reactuse';Usage
typescript
## Demo useDidUpdate(() => console.log("effect runs on updates"), deps);Api
Parameters
| Name | Type | Default | Note |
|---|---|---|---|
| effect | EffectCallback | - | The effect callback |
| deps? | DependencyList | - | The dependencies list for the effect |
Type declaration
typescript
import type { DependencyList, EffectCallback } from 'react';Source
Source • DemoContributors
D
E
H
W