( current: Fiber, workInProgress: Fiber, )
| 189 | } |
| 190 | |
| 191 | export function cloneUpdateQueue<State>( |
| 192 | current: Fiber, |
| 193 | workInProgress: Fiber, |
| 194 | ): void { |
| 195 | // Clone the update queue from current. Unless it's already a clone. |
| 196 | const queue: UpdateQueue<State> = (workInProgress.updateQueue: any); |
| 197 | const currentQueue: UpdateQueue<State> = (current.updateQueue: any); |
| 198 | if (queue === currentQueue) { |
| 199 | const clone: UpdateQueue<State> = { |
| 200 | baseState: currentQueue.baseState, |
| 201 | firstBaseUpdate: currentQueue.firstBaseUpdate, |
| 202 | lastBaseUpdate: currentQueue.lastBaseUpdate, |
| 203 | shared: currentQueue.shared, |
| 204 | callbacks: null, |
| 205 | }; |
| 206 | workInProgress.updateQueue = clone; |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | export function createUpdate(lane: Lane): Update<mixed> { |
| 211 | const update: Update<mixed> = { |
no outgoing calls
no test coverage detected