diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.new.js b/packages/react-reconciler/src/ReactFiberClassComponent.new.js index 0c94bd9441c90..59914edf43398 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.new.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.new.js @@ -199,7 +199,7 @@ const classComponentUpdater = { const suspenseConfig = requestCurrentSuspenseConfig(); const lane = requestUpdateLane(fiber, suspenseConfig); - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); update.payload = payload; if (callback !== undefined && callback !== null) { if (__DEV__) { @@ -230,7 +230,7 @@ const classComponentUpdater = { const suspenseConfig = requestCurrentSuspenseConfig(); const lane = requestUpdateLane(fiber, suspenseConfig); - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); update.tag = ReplaceState; update.payload = payload; @@ -263,7 +263,7 @@ const classComponentUpdater = { const suspenseConfig = requestCurrentSuspenseConfig(); const lane = requestUpdateLane(fiber, suspenseConfig); - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.old.js b/packages/react-reconciler/src/ReactFiberClassComponent.old.js index 68834e49a1d50..d05c494f1ba6d 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.old.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.old.js @@ -199,7 +199,7 @@ const classComponentUpdater = { const suspenseConfig = requestCurrentSuspenseConfig(); const lane = requestUpdateLane(fiber, suspenseConfig); - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); update.payload = payload; if (callback !== undefined && callback !== null) { if (__DEV__) { @@ -230,7 +230,7 @@ const classComponentUpdater = { const suspenseConfig = requestCurrentSuspenseConfig(); const lane = requestUpdateLane(fiber, suspenseConfig); - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); update.tag = ReplaceState; update.payload = payload; @@ -263,7 +263,7 @@ const classComponentUpdater = { const suspenseConfig = requestCurrentSuspenseConfig(); const lane = requestUpdateLane(fiber, suspenseConfig); - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index 18b71a24d8216..2fc397f470164 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -96,11 +96,7 @@ import {markStateUpdateScheduled} from './SchedulingProfiler'; const {ReactCurrentDispatcher, ReactCurrentBatchConfig} = ReactSharedInternals; type Update = {| - // TODO: Temporary field. Will remove this by storing a map of - // transition -> start time on the root. - eventTime: number, lane: Lane, - suspenseConfig: null | SuspenseConfig, action: A, eagerReducer: ((S, A) => S) | null, eagerState: S | null, @@ -714,17 +710,13 @@ function updateReducer( let newBaseQueueLast = null; let update = first; do { - const suspenseConfig = update.suspenseConfig; const updateLane = update.lane; - const updateEventTime = update.eventTime; if (!isSubsetOfLanes(renderLanes, updateLane)) { // Priority is insufficient. Skip this update. If this is the first // skipped update, the previous update/state is the new base // update/state. const clone: Update = { - eventTime: updateEventTime, lane: updateLane, - suspenseConfig: suspenseConfig, action: update.action, eagerReducer: update.eagerReducer, eagerState: update.eagerState, @@ -749,12 +741,10 @@ function updateReducer( if (newBaseQueueLast !== null) { const clone: Update = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. lane: NoLane, - suspenseConfig: update.suspenseConfig, action: update.action, eagerReducer: update.eagerReducer, eagerState: update.eagerState, @@ -1699,9 +1689,7 @@ function dispatchAction( const lane = requestUpdateLane(fiber, suspenseConfig); const update: Update = { - eventTime, lane, - suspenseConfig, action, eagerReducer: null, eagerState: null, diff --git a/packages/react-reconciler/src/ReactFiberHooks.old.js b/packages/react-reconciler/src/ReactFiberHooks.old.js index 0b25cecebaf42..32320c2c35a94 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.old.js +++ b/packages/react-reconciler/src/ReactFiberHooks.old.js @@ -95,11 +95,7 @@ import {markStateUpdateScheduled} from './SchedulingProfiler'; const {ReactCurrentDispatcher, ReactCurrentBatchConfig} = ReactSharedInternals; type Update = {| - // TODO: Temporary field. Will remove this by storing a map of - // transition -> start time on the root. - eventTime: number, lane: Lane, - suspenseConfig: null | SuspenseConfig, action: A, eagerReducer: ((S, A) => S) | null, eagerState: S | null, @@ -713,17 +709,13 @@ function updateReducer( let newBaseQueueLast = null; let update = first; do { - const suspenseConfig = update.suspenseConfig; const updateLane = update.lane; - const updateEventTime = update.eventTime; if (!isSubsetOfLanes(renderLanes, updateLane)) { // Priority is insufficient. Skip this update. If this is the first // skipped update, the previous update/state is the new base // update/state. const clone: Update = { - eventTime: updateEventTime, lane: updateLane, - suspenseConfig: suspenseConfig, action: update.action, eagerReducer: update.eagerReducer, eagerState: update.eagerState, @@ -748,12 +740,10 @@ function updateReducer( if (newBaseQueueLast !== null) { const clone: Update = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. lane: NoLane, - suspenseConfig: update.suspenseConfig, action: update.action, eagerReducer: update.eagerReducer, eagerState: update.eagerState, @@ -1697,9 +1687,7 @@ function dispatchAction( const lane = requestUpdateLane(fiber, suspenseConfig); const update: Update = { - eventTime, lane, - suspenseConfig, action, eagerReducer: null, eagerState: null, diff --git a/packages/react-reconciler/src/ReactFiberNewContext.new.js b/packages/react-reconciler/src/ReactFiberNewContext.new.js index 43f0ac07b773b..fb464e62a2592 100644 --- a/packages/react-reconciler/src/ReactFiberNewContext.new.js +++ b/packages/react-reconciler/src/ReactFiberNewContext.new.js @@ -212,7 +212,6 @@ export function propagateContextChange( const update = createUpdate( NoTimestamp, pickArbitraryLane(renderLanes), - null, ); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the diff --git a/packages/react-reconciler/src/ReactFiberNewContext.old.js b/packages/react-reconciler/src/ReactFiberNewContext.old.js index 92b78587737c7..af28997272441 100644 --- a/packages/react-reconciler/src/ReactFiberNewContext.old.js +++ b/packages/react-reconciler/src/ReactFiberNewContext.old.js @@ -212,7 +212,6 @@ export function propagateContextChange( const update = createUpdate( NoTimestamp, pickArbitraryLane(renderLanes), - null, ); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the diff --git a/packages/react-reconciler/src/ReactFiberReconciler.new.js b/packages/react-reconciler/src/ReactFiberReconciler.new.js index befd70866dc53..fd90dda8e961c 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.new.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.new.js @@ -297,7 +297,7 @@ export function updateContainer( } } - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = {element}; diff --git a/packages/react-reconciler/src/ReactFiberReconciler.old.js b/packages/react-reconciler/src/ReactFiberReconciler.old.js index d2cecfed4976a..549d69724385d 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.old.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.old.js @@ -297,7 +297,7 @@ export function updateContainer( } } - const update = createUpdate(eventTime, lane, suspenseConfig); + const update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = {element}; diff --git a/packages/react-reconciler/src/ReactFiberThrow.new.js b/packages/react-reconciler/src/ReactFiberThrow.new.js index 12d3eb663c88b..f5c6d2aba4cb5 100644 --- a/packages/react-reconciler/src/ReactFiberThrow.new.js +++ b/packages/react-reconciler/src/ReactFiberThrow.new.js @@ -76,7 +76,7 @@ function createRootErrorUpdate( errorInfo: CapturedValue, lane: Lane, ): Update { - const update = createUpdate(NoTimestamp, lane, null); + const update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property @@ -95,7 +95,7 @@ function createClassErrorUpdate( errorInfo: CapturedValue, lane: Lane, ): Update { - const update = createUpdate(NoTimestamp, lane, null); + const update = createUpdate(NoTimestamp, lane); update.tag = CaptureUpdate; const getDerivedStateFromError = fiber.type.getDerivedStateFromError; if (typeof getDerivedStateFromError === 'function') { @@ -274,7 +274,7 @@ function throwException( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - const update = createUpdate(NoTimestamp, SyncLane, null); + const update = createUpdate(NoTimestamp, SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update); } diff --git a/packages/react-reconciler/src/ReactFiberThrow.old.js b/packages/react-reconciler/src/ReactFiberThrow.old.js index a215d363e2fa0..e6c27de5e9853 100644 --- a/packages/react-reconciler/src/ReactFiberThrow.old.js +++ b/packages/react-reconciler/src/ReactFiberThrow.old.js @@ -76,7 +76,7 @@ function createRootErrorUpdate( errorInfo: CapturedValue, lane: Lane, ): Update { - const update = createUpdate(NoTimestamp, lane, null); + const update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property @@ -95,7 +95,7 @@ function createClassErrorUpdate( errorInfo: CapturedValue, lane: Lane, ): Update { - const update = createUpdate(NoTimestamp, lane, null); + const update = createUpdate(NoTimestamp, lane); update.tag = CaptureUpdate; const getDerivedStateFromError = fiber.type.getDerivedStateFromError; if (typeof getDerivedStateFromError === 'function') { @@ -276,7 +276,7 @@ function throwException( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - const update = createUpdate(NoTimestamp, SyncLane, null); + const update = createUpdate(NoTimestamp, SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update); } diff --git a/packages/react-reconciler/src/ReactUpdateQueue.new.js b/packages/react-reconciler/src/ReactUpdateQueue.new.js index ad54306c3c54b..303e02f07d609 100644 --- a/packages/react-reconciler/src/ReactUpdateQueue.new.js +++ b/packages/react-reconciler/src/ReactUpdateQueue.new.js @@ -86,7 +86,6 @@ import type {Fiber} from './ReactInternalTypes'; import type {Lanes, Lane} from './ReactFiberLane'; -import type {SuspenseConfig} from './ReactFiberSuspenseConfig'; import {NoLane, NoLanes, isSubsetOfLanes, mergeLanes} from './ReactFiberLane'; import { @@ -109,7 +108,6 @@ export type Update = {| // transition -> event time on the root. eventTime: number, lane: Lane, - suspenseConfig: null | SuspenseConfig, tag: 0 | 1 | 2 | 3, payload: any, @@ -183,15 +181,10 @@ export function cloneUpdateQueue( } } -export function createUpdate( - eventTime: number, - lane: Lane, - suspenseConfig: null | SuspenseConfig, -): Update<*> { +export function createUpdate(eventTime: number, lane: Lane): Update<*> { const update: Update<*> = { eventTime, lane, - suspenseConfig, tag: UpdateState, payload: null, @@ -266,7 +259,6 @@ export function enqueueCapturedUpdate( const clone: Update = { eventTime: update.eventTime, lane: update.lane, - suspenseConfig: update.suspenseConfig, tag: update.tag, payload: update.payload, @@ -479,7 +471,6 @@ export function processUpdateQueue( const clone: Update = { eventTime: updateEventTime, lane: updateLane, - suspenseConfig: update.suspenseConfig, tag: update.tag, payload: update.payload, @@ -505,7 +496,6 @@ export function processUpdateQueue( // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. lane: NoLane, - suspenseConfig: update.suspenseConfig, tag: update.tag, payload: update.payload, diff --git a/packages/react-reconciler/src/ReactUpdateQueue.old.js b/packages/react-reconciler/src/ReactUpdateQueue.old.js index 13030fc3ccd44..787ec3d18c3a3 100644 --- a/packages/react-reconciler/src/ReactUpdateQueue.old.js +++ b/packages/react-reconciler/src/ReactUpdateQueue.old.js @@ -86,7 +86,6 @@ import type {Fiber} from './ReactInternalTypes'; import type {Lanes, Lane} from './ReactFiberLane'; -import type {SuspenseConfig} from './ReactFiberSuspenseConfig'; import {NoLane, NoLanes, isSubsetOfLanes, mergeLanes} from './ReactFiberLane'; import { @@ -109,7 +108,6 @@ export type Update = {| // transition -> event time on the root. eventTime: number, lane: Lane, - suspenseConfig: null | SuspenseConfig, tag: 0 | 1 | 2 | 3, payload: any, @@ -183,15 +181,10 @@ export function cloneUpdateQueue( } } -export function createUpdate( - eventTime: number, - lane: Lane, - suspenseConfig: null | SuspenseConfig, -): Update<*> { +export function createUpdate(eventTime: number, lane: Lane): Update<*> { const update: Update<*> = { eventTime, lane, - suspenseConfig, tag: UpdateState, payload: null, @@ -266,7 +259,6 @@ export function enqueueCapturedUpdate( const clone: Update = { eventTime: update.eventTime, lane: update.lane, - suspenseConfig: update.suspenseConfig, tag: update.tag, payload: update.payload, @@ -479,7 +471,6 @@ export function processUpdateQueue( const clone: Update = { eventTime: updateEventTime, lane: updateLane, - suspenseConfig: update.suspenseConfig, tag: update.tag, payload: update.payload, @@ -505,7 +496,6 @@ export function processUpdateQueue( // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. lane: NoLane, - suspenseConfig: update.suspenseConfig, tag: update.tag, payload: update.payload,