(fiber, update, lane)
| 13495 | return update; |
| 13496 | } |
| 13497 | function enqueueUpdate(fiber, update, lane) { |
| 13498 | var updateQueue = fiber.updateQueue; |
| 13499 | |
| 13500 | if (updateQueue === null) { |
| 13501 | // Only occurs if the fiber has been unmounted. |
| 13502 | return null; |
| 13503 | } |
| 13504 | |
| 13505 | var sharedQueue = updateQueue.shared; |
| 13506 | |
| 13507 | { |
| 13508 | if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) { |
| 13509 | error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.'); |
| 13510 | |
| 13511 | didWarnUpdateInsideUpdate = true; |
| 13512 | } |
| 13513 | } |
| 13514 | |
| 13515 | if (isUnsafeClassRenderPhaseUpdate()) { |
| 13516 | // This is an unsafe render phase update. Add directly to the update |
| 13517 | // queue so we can process it immediately during the current render. |
| 13518 | var pending = sharedQueue.pending; |
| 13519 | |
| 13520 | if (pending === null) { |
| 13521 | // This is the first update. Create a circular list. |
| 13522 | update.next = update; |
| 13523 | } else { |
| 13524 | update.next = pending.next; |
| 13525 | pending.next = update; |
| 13526 | } |
| 13527 | |
| 13528 | sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering |
| 13529 | // this fiber. This is for backwards compatibility in the case where you |
| 13530 | // update a different component during render phase than the one that is |
| 13531 | // currently renderings (a pattern that is accompanied by a warning). |
| 13532 | |
| 13533 | return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane); |
| 13534 | } else { |
| 13535 | return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane); |
| 13536 | } |
| 13537 | } |
| 13538 | function entangleTransitions(root, fiber, lane) { |
| 13539 | var updateQueue = fiber.updateQueue; |
| 13540 |
no test coverage detected
searching dependent graphs…