Skip to content

Commit 4fff899

Browse files
committed
Merge branch 'master' of github.com:BetaSu/big-react
2 parents 58116b8 + 616cc93 commit 4fff899

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
- 💪 功能完备,当前可跑通官方测试用例数量:34
77
- 🚶 按`Git Tag`划分迭代步骤,记录从 0 实现的每个功能
88

9-
如果想跟着我学习「如何从0到1实现React18」,可以购买如下课程:
10-
11-
<img width="200" src="https://user-images.githubusercontent.com/15828041/204089108-eaccf461-1521-4a68-bcd1-d04aef1bd6ad.png" alt="卡颂" />
9+
如果想跟着我学习「如何从0到1实现React18」,可以[点击这里](https://qux.xet.tech/s/2wiFh1)
1210

1311

1412
## TODO List

packages/react-reconciler/src/updateQueue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Disptach } from 'react/src/currentDispatcher';
1+
import { Dispatch } from 'react/src/currentDispatcher';
22
import { Action } from 'shared/ReactTypes';
33
import { Update } from './fiberFlags';
44
import {
@@ -19,7 +19,7 @@ export interface UpdateQueue<State> {
1919
shared: {
2020
pending: Update<State> | null;
2121
};
22-
dispatch: Disptach<State> | null;
22+
dispatch: Dispatch<State> | null;
2323
}
2424

2525
// 创建

packages/react/src/currentDispatcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Action } from 'shared/ReactTypes';
22

33
export type Dispatcher = {
4-
useState: <T>(initialState: (() => T) | T) => [T, Disptach<T>];
4+
useState: <T>(initialState: (() => T) | T) => [T, Dispatch<T>];
55
useEffect: (callback: (() => void) | void, deps: any[] | void) => void;
66
};
77

8-
export type Disptach<State> = (action: Action<State>) => void;
8+
export type Dispatch<State> = (action: Action<State>) => void;
99

1010
const currentDispatcher: { current: null | Dispatcher } = {
1111
current: null

0 commit comments

Comments
 (0)