Skip to content

Commit df31952

Browse files
authored
Remove offscreen type (#32639)
Based off #32499 This is no longer used. [Review commit](88c297d)
1 parent 1a19170 commit df31952

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

packages/react-reconciler/src/ReactFiber.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ import {
103103
REACT_MEMO_TYPE,
104104
REACT_LAZY_TYPE,
105105
REACT_SCOPE_TYPE,
106-
REACT_OFFSCREEN_TYPE,
107106
REACT_LEGACY_HIDDEN_TYPE,
108107
REACT_TRACING_MARKER_TYPE,
109108
REACT_ELEMENT_TYPE,
@@ -614,8 +613,6 @@ export function createFiberFromTypeAndProps(
614613
return createFiberFromSuspense(pendingProps, mode, lanes, key);
615614
case REACT_SUSPENSE_LIST_TYPE:
616615
return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
617-
case REACT_OFFSCREEN_TYPE:
618-
return createFiberFromOffscreen(pendingProps, mode, lanes, key);
619616
case REACT_LEGACY_HIDDEN_TYPE:
620617
if (enableLegacyHidden) {
621618
return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);
@@ -854,7 +851,6 @@ export function createFiberFromOffscreen(
854851
key: null | string,
855852
): Fiber {
856853
const fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
857-
fiber.elementType = REACT_OFFSCREEN_TYPE;
858854
fiber.lanes = lanes;
859855
const primaryChildInstance: OffscreenInstance = {
860856
_visibility: OffscreenVisible,

packages/shared/ReactSymbols.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export const REACT_SUSPENSE_LIST_TYPE: symbol = Symbol.for(
3333
export const REACT_MEMO_TYPE: symbol = Symbol.for('react.memo');
3434
export const REACT_LAZY_TYPE: symbol = Symbol.for('react.lazy');
3535
export const REACT_SCOPE_TYPE: symbol = Symbol.for('react.scope');
36-
export const REACT_OFFSCREEN_TYPE: symbol = Symbol.for('react.offscreen');
3736
export const REACT_ACTIVITY_TYPE: symbol = Symbol.for('react.activity');
3837
export const REACT_LEGACY_HIDDEN_TYPE: symbol = Symbol.for(
3938
'react.legacy_hidden',

packages/shared/isValidElementType.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
REACT_LAZY_TYPE,
2222
REACT_SCOPE_TYPE,
2323
REACT_LEGACY_HIDDEN_TYPE,
24-
REACT_OFFSCREEN_TYPE,
2524
REACT_TRACING_MARKER_TYPE,
2625
REACT_VIEW_TRANSITION_TYPE,
2726
REACT_ACTIVITY_TYPE,
@@ -52,7 +51,6 @@ export default function isValidElementType(type: mixed): boolean {
5251
type === REACT_SUSPENSE_LIST_TYPE ||
5352
(enableLegacyHidden && type === REACT_LEGACY_HIDDEN_TYPE) ||
5453
type === REACT_ACTIVITY_TYPE ||
55-
type === REACT_OFFSCREEN_TYPE ||
5654
(enableScopeAPI && type === REACT_SCOPE_TYPE) ||
5755
(enableTransitionTracing && type === REACT_TRACING_MARKER_TYPE) ||
5856
(enableViewTransition && type === REACT_VIEW_TRANSITION_TYPE)

0 commit comments

Comments
 (0)