(fiber, queue, action, lane)
| 8155 | dispatchSetStateInternal(fiber, queue, action, lane); |
| 8156 | } |
| 8157 | function dispatchSetStateInternal(fiber, queue, action, lane) { |
| 8158 | var update = { |
| 8159 | lane: lane, |
| 8160 | revertLane: 0, |
| 8161 | action: action, |
| 8162 | hasEagerState: !1, |
| 8163 | eagerState: null, |
| 8164 | next: null |
| 8165 | }; |
| 8166 | if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update); |
| 8167 | else { |
| 8168 | var alternate = fiber.alternate; |
| 8169 | if ( |
| 8170 | 0 === fiber.lanes && |
| 8171 | (null === alternate || 0 === alternate.lanes) && |
| 8172 | ((alternate = queue.lastRenderedReducer), null !== alternate) |
| 8173 | ) |
| 8174 | try { |
| 8175 | var currentState = queue.lastRenderedState, |
| 8176 | eagerState = alternate(currentState, action); |
| 8177 | update.hasEagerState = !0; |
| 8178 | update.eagerState = eagerState; |
| 8179 | if (objectIs(eagerState, currentState)) |
| 8180 | return ( |
| 8181 | enqueueUpdate$1(fiber, queue, update, 0), |
| 8182 | null === workInProgressRoot && finishQueueingConcurrentUpdates(), |
| 8183 | !1 |
| 8184 | ); |
| 8185 | } catch (error) { |
| 8186 | } finally { |
| 8187 | } |
| 8188 | action = enqueueConcurrentHookUpdate(fiber, queue, update, lane); |
| 8189 | if (null !== action) |
| 8190 | return ( |
| 8191 | scheduleUpdateOnFiber(action, fiber, lane), |
| 8192 | entangleTransitionUpdate(action, queue, lane), |
| 8193 | !0 |
| 8194 | ); |
| 8195 | } |
| 8196 | return !1; |
| 8197 | } |
| 8198 | function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { |
| 8199 | action = { |
| 8200 | lane: 2, |
no test coverage detected
searching dependent graphs…