Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ function commitPlacement(finishedWork: Fiber): void {
let node: Fiber = finishedWork;
while (true) {
const isHost = node.tag === HostComponent || node.tag === HostText;
if (isHost || node.tag === FundamentalComponent) {
if (isHost || (enableFundamentalAPI && node.tag === FundamentalComponent)) {
const stateNode = isHost ? node.stateNode : node.stateNode.instance;
if (before) {
if (isContainer) {
Expand Down Expand Up @@ -1144,7 +1144,7 @@ function unmountHostComponents(current, renderPriorityLevel): void {
);
}
// Don't visit children because we already visited them.
} else if (node.tag === FundamentalComponent) {
} else if (enableFundamentalAPI && node.tag === FundamentalComponent) {
const fundamentalNode = node.stateNode.instance;
commitNestedUnmounts(node, renderPriorityLevel);
// After all the children have unmounted, it is now safe to remove the
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberCompleteWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ if (supportsMutation) {
while (node !== null) {
if (node.tag === HostComponent || node.tag === HostText) {
appendInitialChild(parent, node.stateNode);
} else if (node.tag === FundamentalComponent) {
} else if (enableFundamentalAPI && node.tag === FundamentalComponent) {
appendInitialChild(parent, node.stateNode.instance);
} else if (node.tag === HostPortal) {
// If we have a portal child, then we don't want to traverse
Expand Down
3 changes: 2 additions & 1 deletion packages/react-reconciler/src/ReactFiberTreeReflection.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
FundamentalComponent,
} from 'shared/ReactWorkTags';
import {NoEffect, Placement} from 'shared/ReactSideEffectTags';
import {enableFundamentalAPI} from 'shared/ReactFeatureFlags';

const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;

Expand Down Expand Up @@ -281,7 +282,7 @@ export function findCurrentHostFiberWithNoPortals(parent: Fiber): Fiber | null {
if (
node.tag === HostComponent ||
node.tag === HostText ||
node.tag === FundamentalComponent
(enableFundamentalAPI && node.tag === FundamentalComponent)
) {
return node;
} else if (node.child && node.tag !== HostPortal) {
Expand Down