Skip to content

Commit 538fb4a

Browse files
committed
fix: TextInstance 拼写错误
1 parent 383bf37 commit 538fb4a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/react-dom/src/hostConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export type Container = Element | Document;
22
export type Instance = Element;
3-
export type TextInstanve = Text;
3+
export type TextInstance = Text;
44

55
export const createInstance = (type: string) => {
66
return document.createElement(type);

packages/react-reconciler/src/completeWork.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export const completeWork = (workInProgress: FiberNode) => {
6969
return null;
7070
case HostText:
7171
// 初始化DOM
72-
const textInstanve = createTextInstance(newProps.content);
73-
workInProgress.stateNode = textInstanve;
72+
const TextInstance = createTextInstance(newProps.content);
73+
workInProgress.stateNode = TextInstance;
7474
// 冒泡flag
7575
bubbleProperties(workInProgress);
7676
return null;

0 commit comments

Comments
 (0)