File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
generatedTypes/src/hooks/useDidUpdate Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change
1
+ import { DependencyList } from 'react' ;
1
2
/**
2
3
* This hook avoid calling useEffect on the initial value of his dependency array
3
4
*/
4
- declare const useDidUpdate : ( callback : ( ) => void , dep : [ any ] ) => void ;
5
+ declare const useDidUpdate : ( callback : ( ) => void , dep : DependencyList ) => void ;
5
6
export default useDidUpdate ;
Original file line number Diff line number Diff line change 1
- import { useEffect , useRef } from 'react' ;
1
+ import { useEffect , useRef , DependencyList } from 'react' ;
2
2
3
3
/**
4
4
* This hook avoid calling useEffect on the initial value of his dependency array
5
5
*/
6
- const useDidUpdate = ( callback : ( ) => void , dep : [ any ] ) => {
6
+ const useDidUpdate = ( callback : ( ) => void , dep : DependencyList ) => {
7
7
const isMounted = useRef < boolean > ( false ) ;
8
8
9
9
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments