Home > @lndsld/react-hooks > useChange
Subscribe to value changes (like componentDidUpdate from class components)
Signature:
declare function useChange<T>(observer: ChangeCallback<T>, observable: T): void;
| Parameter | Type | Description |
|---|---|---|
| observer | ChangeCallback<T> | callback, that should be invoked on value change |
| observable | T | value, which changes should be observed by hook |
Returns:
void