(fiber, update, lane)
| 14608 | return update; |
| 14609 | } |
| 14610 | function enqueueUpdate(fiber, update, lane) { |
| 14611 | var updateQueue = fiber.updateQueue; |
| 14612 | |
| 14613 | if (updateQueue === null) { |
| 14614 | // Only occurs if the fiber has been unmounted. |
| 14615 | return null; |
| 14616 | } |
| 14617 | |
| 14618 | var sharedQueue = updateQueue.shared; |
| 14619 | |
| 14620 | { |
| 14621 | if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) { |
| 14622 | 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.'); |
| 14623 | |
| 14624 | didWarnUpdateInsideUpdate = true; |
| 14625 | } |
| 14626 | } |
| 14627 | |
| 14628 | if (isUnsafeClassRenderPhaseUpdate()) { |
| 14629 | // This is an unsafe render phase update. Add directly to the update |
| 14630 | // queue so we can process it immediately during the current render. |
| 14631 | var pending = sharedQueue.pending; |
| 14632 | |
| 14633 | if (pending === null) { |
| 14634 | // This is the first update. Create a circular list. |
| 14635 | update.next = update; |
| 14636 | } else { |
| 14637 | update.next = pending.next; |
| 14638 | pending.next = update; |
| 14639 | } |
| 14640 | |
| 14641 | sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering |
| 14642 | // this fiber. This is for backwards compatibility in the case where you |
| 14643 | // update a different component during render phase than the one that is |
| 14644 | // currently renderings (a pattern that is accompanied by a warning). |
| 14645 | |
| 14646 | return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane); |
| 14647 | } else { |
| 14648 | return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane); |
| 14649 | } |
| 14650 | } |
| 14651 | function entangleTransitions(root, fiber, lane) { |
| 14652 | var updateQueue = fiber.updateQueue; |
| 14653 |
no test coverage detected
searching dependent graphs…