1 | import { DependencyList, EffectCallback } from 'react';
|
2 | export declare type EffectHook = (effect: EffectCallback, deps?: DependencyList) => void;
|
3 | export declare type IsEqual<TDeps extends DependencyList> = (nextDeps: TDeps, prevDeps: TDeps) => boolean;
|
4 | export declare type CustomEffectOptions<TDeps extends DependencyList> = {
|
5 | isEqual: IsEqual<TDeps>;
|
6 | effectHook?: EffectHook;
|
7 | };
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | declare function useCustomEffect<TDeps extends DependencyList = DependencyList>(effect: EffectCallback, dependencies: TDeps, isEqual: IsEqual<TDeps>): void;
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | declare function useCustomEffect<TDeps extends DependencyList = DependencyList>(effect: EffectCallback, dependencies: TDeps, options: CustomEffectOptions<TDeps>): void;
|
26 | export default useCustomEffect;
|