GeezerVison is showing github.com — Fork ReactFiberLane (#20371) · react/react@88ef957
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-dom/src/events/ReactDOMEventListener.js +21-4Lines changed: 21 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,6 +41,7 @@ import {getClosestInstanceFromNode} from '../client/ReactDOMComponentTree'; | 41 | 41 | import { | 42 | 42 | enableLegacyFBSupport, | 43 | 43 | decoupleUpdatePriorityFromScheduler, | | 44 | + enableNewReconciler, | 44 | 45 | } from 'shared/ReactFeatureFlags'; | 45 | 46 | import { | 46 | 47 | UserBlockingEvent, | @@ -53,11 +54,27 @@ import { | 53 | 54 | flushDiscreteUpdatesIfNeeded, | 54 | 55 | discreteUpdates, | 55 | 56 | } from './ReactDOMUpdateBatching'; | | 57 | + | | 58 | +import { | | 59 | + InputContinuousLanePriority as InputContinuousLanePriority_old, | | 60 | + getCurrentUpdateLanePriority as getCurrentUpdateLanePriority_old, | | 61 | + setCurrentUpdateLanePriority as setCurrentUpdateLanePriority_old, | | 62 | +} from 'react-reconciler/src/ReactFiberLane.old'; | 56 | 63 | import { | 57 | | - InputContinuousLanePriority, | 58 | | - getCurrentUpdateLanePriority, | 59 | | - setCurrentUpdateLanePriority, | 60 | | -} from 'react-reconciler/src/ReactFiberLane'; | | 64 | + InputContinuousLanePriority as InputContinuousLanePriority_new, | | 65 | + getCurrentUpdateLanePriority as getCurrentUpdateLanePriority_new, | | 66 | + setCurrentUpdateLanePriority as setCurrentUpdateLanePriority_new, | | 67 | +} from 'react-reconciler/src/ReactFiberLane.new'; | | 68 | + | | 69 | +const InputContinuousLanePriority = enableNewReconciler | | 70 | + ? InputContinuousLanePriority_new | | 71 | + : InputContinuousLanePriority_old; | | 72 | +const getCurrentUpdateLanePriority = enableNewReconciler | | 73 | + ? getCurrentUpdateLanePriority_new | | 74 | + : getCurrentUpdateLanePriority_old; | | 75 | +const setCurrentUpdateLanePriority = enableNewReconciler | | 76 | + ? setCurrentUpdateLanePriority_new | | 77 | + : setCurrentUpdateLanePriority_old; | 61 | 78 |
| 62 | 79 | const { | 63 | 80 | unstable_UserBlockingPriority: UserBlockingPriority, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-dom/src/events/ReactDOMEventReplaying.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ import type {Container, SuspenseInstance} from '../client/ReactDOMHostConfig'; | 12 | 12 | import type {DOMEventName} from '../events/DOMEventNames'; | 13 | 13 | import type {EventSystemFlags} from './EventSystemFlags'; | 14 | 14 | import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes'; | 15 | | -import type {LanePriority} from 'react-reconciler/src/ReactFiberLane'; | | 15 | +import type {LanePriority} from 'react-reconciler/src/ReactFiberLane.old'; | 16 | 16 |
| 17 | 17 | import {enableSelectiveHydration} from 'shared/ReactFeatureFlags'; | 18 | 18 | import { | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/DebugTracing.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | * @flow | 8 | 8 | */ | 9 | 9 |
| 10 | | -import type {Lane, Lanes} from './ReactFiberLane'; | | 10 | +import type {Lane, Lanes} from './ReactFiberLane.old'; | 11 | 11 | import type {Wakeable} from 'shared/ReactTypes'; | 12 | 12 |
| 13 | 13 | import {enableDebugTracing} from 'shared/ReactFeatureFlags'; | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactChildFiber.new.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | import type {ReactElement} from 'shared/ReactElementType'; | 11 | 11 | import type {ReactPortal} from 'shared/ReactTypes'; | 12 | 12 | import type {Fiber} from './ReactInternalTypes'; | 13 | | -import type {Lanes} from './ReactFiberLane'; | | 13 | +import type {Lanes} from './ReactFiberLane.new'; | 14 | 14 |
| 15 | 15 | import getComponentName from 'shared/getComponentName'; | 16 | 16 | import {Placement, Deletion} from './ReactFiberFlags'; | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactChildFiber.old.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | import type {ReactElement} from 'shared/ReactElementType'; | 11 | 11 | import type {ReactPortal} from 'shared/ReactTypes'; | 12 | 12 | import type {Fiber} from './ReactInternalTypes'; | 13 | | -import type {Lanes} from './ReactFiberLane'; | | 13 | +import type {Lanes} from './ReactFiberLane.old'; | 14 | 14 |
| 15 | 15 | import getComponentName from 'shared/getComponentName'; | 16 | 16 | import {Placement, Deletion} from './ReactFiberFlags'; | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiber.new.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ import type {Fiber} from './ReactInternalTypes'; | 18 | 18 | import type {RootTag} from './ReactRootTags'; | 19 | 19 | import type {WorkTag} from './ReactWorkTags'; | 20 | 20 | import type {TypeOfMode} from './ReactTypeOfMode'; | 21 | | -import type {Lanes} from './ReactFiberLane'; | | 21 | +import type {Lanes} from './ReactFiberLane.new'; | 22 | 22 | import type {SuspenseInstance} from './ReactFiberHostConfig'; | 23 | 23 | import type {OffscreenProps} from './ReactFiberOffscreenComponent'; | 24 | 24 |
| @@ -63,7 +63,7 @@ import { | 63 | 63 | resolveFunctionForHotReloading, | 64 | 64 | resolveForwardRefForHotReloading, | 65 | 65 | } from './ReactFiberHotReloading.new'; | 66 | | -import {NoLanes} from './ReactFiberLane'; | | 66 | +import {NoLanes} from './ReactFiberLane.new'; | 67 | 67 | import { | 68 | 68 | NoMode, | 69 | 69 | ConcurrentMode, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiber.old.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ import type {Fiber} from './ReactInternalTypes'; | 18 | 18 | import type {RootTag} from './ReactRootTags'; | 19 | 19 | import type {WorkTag} from './ReactWorkTags'; | 20 | 20 | import type {TypeOfMode} from './ReactTypeOfMode'; | 21 | | -import type {Lanes} from './ReactFiberLane'; | | 21 | +import type {Lanes} from './ReactFiberLane.old'; | 22 | 22 | import type {SuspenseInstance} from './ReactFiberHostConfig'; | 23 | 23 | import type {OffscreenProps} from './ReactFiberOffscreenComponent'; | 24 | 24 |
| @@ -63,7 +63,7 @@ import { | 63 | 63 | resolveFunctionForHotReloading, | 64 | 64 | resolveForwardRefForHotReloading, | 65 | 65 | } from './ReactFiberHotReloading.old'; | 66 | | -import {NoLanes} from './ReactFiberLane'; | | 66 | +import {NoLanes} from './ReactFiberLane.old'; | 67 | 67 | import { | 68 | 68 | NoMode, | 69 | 69 | ConcurrentMode, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberBeginWork.new.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import type {ReactProviderType, ReactContext} from 'shared/ReactTypes'; | 11 | 11 | import type {LazyComponent as LazyComponentType} from 'react/src/ReactLazy'; | 12 | 12 | import type {Fiber} from './ReactInternalTypes'; | 13 | 13 | import type {FiberRoot} from './ReactInternalTypes'; | 14 | | -import type {Lanes, Lane} from './ReactFiberLane'; | | 14 | +import type {Lanes, Lane} from './ReactFiberLane.new'; | 15 | 15 | import type {MutableSource} from 'shared/ReactTypes'; | 16 | 16 | import type { | 17 | 17 | SuspenseState, | @@ -113,7 +113,7 @@ import { | 113 | 113 | removeLanes, | 114 | 114 | mergeLanes, | 115 | 115 | getBumpedLaneForHydration, | 116 | | -} from './ReactFiberLane'; | | 116 | +} from './ReactFiberLane.new'; | 117 | 117 | import { | 118 | 118 | ConcurrentMode, | 119 | 119 | NoMode, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberBeginWork.old.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import type {ReactProviderType, ReactContext} from 'shared/ReactTypes'; | 11 | 11 | import type {LazyComponent as LazyComponentType} from 'react/src/ReactLazy'; | 12 | 12 | import type {Fiber} from './ReactInternalTypes'; | 13 | 13 | import type {FiberRoot} from './ReactInternalTypes'; | 14 | | -import type {Lanes, Lane} from './ReactFiberLane'; | | 14 | +import type {Lanes, Lane} from './ReactFiberLane.old'; | 15 | 15 | import type {MutableSource} from 'shared/ReactTypes'; | 16 | 16 | import type { | 17 | 17 | SuspenseState, | @@ -113,7 +113,7 @@ import { | 113 | 113 | removeLanes, | 114 | 114 | mergeLanes, | 115 | 115 | getBumpedLaneForHydration, | 116 | | -} from './ReactFiberLane'; | | 116 | +} from './ReactFiberLane.old'; | 117 | 117 | import { | 118 | 118 | ConcurrentMode, | 119 | 119 | NoMode, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberClassComponent.new.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | */ | 9 | 9 |
| 10 | 10 | import type {Fiber} from './ReactInternalTypes'; | 11 | | -import type {Lanes} from './ReactFiberLane'; | | 11 | +import type {Lanes} from './ReactFiberLane.new'; | 12 | 12 | import type {UpdateQueue} from './ReactUpdateQueue.new'; | 13 | 13 |
| 14 | 14 | import * as React from 'react'; | @@ -42,7 +42,7 @@ import { | 42 | 42 | initializeUpdateQueue, | 43 | 43 | cloneUpdateQueue, | 44 | 44 | } from './ReactUpdateQueue.new'; | 45 | | -import {NoLanes} from './ReactFiberLane'; | | 45 | +import {NoLanes} from './ReactFiberLane.new'; | 46 | 46 | import { | 47 | 47 | cacheContext, | 48 | 48 | getMaskedContext, | |
|