File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- import { Disptach } from 'react/src/currentDispatcher' ;
1
+ import { Dispatch } from 'react/src/currentDispatcher' ;
2
2
import { Action } from 'shared/ReactTypes' ;
3
3
import { Update } from './fiberFlags' ;
4
4
import {
@@ -19,7 +19,7 @@ export interface UpdateQueue<State> {
19
19
shared : {
20
20
pending : Update < State > | null ;
21
21
} ;
22
- dispatch : Disptach < State > | null ;
22
+ dispatch : Dispatch < State > | null ;
23
23
}
24
24
25
25
// 创建
Original file line number Diff line number Diff line change 1
1
import { Action } from 'shared/ReactTypes' ;
2
2
3
3
export type Dispatcher = {
4
- useState : < T > ( initialState : ( ( ) => T ) | T ) => [ T , Disptach < T > ] ;
4
+ useState : < T > ( initialState : ( ( ) => T ) | T ) => [ T , Dispatch < T > ] ;
5
5
useEffect : ( callback : ( ( ) => void ) | void , deps : any [ ] | void ) => void ;
6
6
} ;
7
7
8
- export type Disptach < State > = ( action : Action < State > ) => void ;
8
+ export type Dispatch < State > = ( action : Action < State > ) => void ;
9
9
10
10
const currentDispatcher : { current : null | Dispatcher } = {
11
11
current : null
You can’t perform that action at this time.
0 commit comments