/
6. 函数组件更新.txt
147 lines (147 loc) · 11.8 KB
/
6. 函数组件更新.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
[0] ReactDOM.render [start]
[1] legacyRenderSubtreeIntoContainer
[2] unbatchedUpdates
[3] fn
[4] updateContainer
[5] scheduleUpdateOnFiber
[6] performSyncWorkOnRoot
[7] renderRootSync
[8] workLoopSync
[9] performUnitOfWork
[10] beginWork$1
[11] beginWork
[12] mountIndeterminateComponent
[13] renderWithHooks
[14] Component
[15] useState [start]
[16] resolveDispatcher
[16] dispatcher.useState
[17] mountHookTypesDev
[17] mountState
[18] mountWorkInProgressHook
[15] useState [end]
[7] commitRoot
[0] ReactDOM.render [end]
[0] user click [start]
[1] discreteUpdates
[2] discreteUpdatesImpl=discreteUpdates$1
[3] runWithPriority$1
[4] Scheduler_runWithPriority
[5] eventHandler=dispatchEvent
[6] attemptToDispatchEvent
[7] dispatchEventForPluginEventSystem
[8] batchedEventUpdates
[9] batchedEventUpdatesImpl
[10] fn
[11] dispatchEventsForPlugins
[12] processDispatchQueue
[13] processDispatchQueueItemsInOrder
[14] executeDispatch
[15] invokeGuardedCallbackAndCatchFirstError
[16] invokeGuardedCallback
[17] invokeGuardedCallbackImpl$1
[18] fakeNode.dispatchEvent
[19] func.apply
[20] onDivClick [start]
[20] setState
[21] requestUpdateLane
[21] lastRenderedReducer=basicStateReducer
[21] objectIs [update?]
[21] scheduleUpdateOnFiber
[22] checkForNestedUpdates
[22] warnAboutRenderPhaseUpdatesInDEV
[22] markUpdateLaneFromFiberToRoot
[22] markRootUpdated
[22] getCurrentPriorityLevel
[22] ensureRootIsScheduled
[23] markStarvedLanesAsExpired
[23] getNextLanes
[23] returnNextLanesPriority
[23] scheduleSyncCallback (syncQueue = [callback=performSyncWorkOnRoot])
[24] Scheduler_scheduleCallback=unstable_scheduleCallback
[22] schedulePendingInteractions
[23] scheduleInteractions
[21] markStateUpdateScheduled
[20] onDivClick [end]
[3] resetRenderTimer
[3] flushSyncCallbackQueue
[4] flushSyncCallbackQueueImpl (syncQueue = [callback=performSyncWorkOnRoot])
[5] runWithPriority$1
[6] Scheduler_runWithPriority=unstable_runWithPriority
[7] eventHandler
[8] callback=performSyncWorkOnRoot (22897)
[9] renderRootSync
[10] prepareFreshStack
[11] createWorkInProgress
[12] (workInProgress {tag: 3} .child {null} = current {tag: 3} .child {tag: 0})
[10] markRenderStarted [render start]
[10] workLoopSync
[11] performUnitOfWork {tag: 3}
[12] beginWork$1
[13] beginWork
[14] bailoutOnAlreadyFinishedWork
[15] cloneChildFibers
[16] createWorkInProgress
[17] createFiber
[17] (workInProgress {tag: 0} .child {null} = current {tag: 0} .child {tag: 5})
[11] performUnitOfWork {tag: 0} (<App />)
[12] beginWork$1
[13] beginWork
[14] updateFunctionComponent
[15] renderWithHooks
[16] Component
[17] App [start]
[17] useState
[18] App [end]
[15] reconcileChildren
[16] reconcileChildFibers
[17] reconcileSingleElement
[18] useFiber
[19] createWorkInProgress
[20] createFiber
[20] (workInProgress {tag: 5} .child {null} = current {tag: 5} .child {null})
[18] coerceRef
[17] placeSingleChild
[11] performUnitOfWork {tag: 5} (<div />)
[12] beginWork$1
[13] beginWork
[14] updateHostComponent
[15] reconcileChildren
[16] reconcileChildFibers
[17] deleteRemainingChildren
[12] completeUnitOfWork
[13] completeWork {tag: 5} (<div />)
[13] completeWork {tag: 0} (<App />)
[13] completeWork {tag: 3}
[10] markRenderStopped [render end]
[9] commitRoot
[10] runWithPriority$1
[11] Scheduler_runWithPriority
[12] eventHandler=commitRootImpl
[13] markCommitStarted [commit start]
[13] invokeGuardedCallback
[14] invokeGuardedCallbackImpl$1
[15] dispatchEvent
[16] func=commitBeforeMutationEffects
[13] invokeGuardedCallback
[14] invokeGuardedCallbackImpl$1
[15] dispatchEvent
[16] func=commitMutationEffects
[17] commitWork
[18] commitUpdate
[19] updateFiberProps {children: 1}
[19] updateProperties
[20] updateDOMProperties
[21] setTextContent
[22] (firstChild {#text}.nodeValue {'0'} = text {'1'}) [udpate dom]
[13] (root {tag: 0} .current {tag: 3} = finishedWork {tag: 3})
[13] invokeGuardedCallback
[14] invokeGuardedCallbackImpl
[15] dispatchEvent
[16] func=commitLayoutEffects
[17] commitLifeCycles
[13] flushSyncCallbackQueue
[14] flushSyncCallbackQueueImpl
[13] markCommitStopped [commit end]
[7] ensureRootIsScheduled
[2] finishEventHandler