rename unstable_Offscreen to unstable_Activity (#27640)

Summary:
`Activity` is the current candidate name. This PR starts the rename work
by renaming the exported unstable component name.

NOTE: downstream consumers need to rename the import when updating to
this commit.

DiffTrain build for commit https://github.com/facebook/react/commit/ce2bc58a9f6f3b0bfc8c738a0d8e2a5f3a332ff5.

Reviewed By: tyao1

Differential Revision: D50945046

Pulled By: kassens

fbshipit-source-id: be9b3254c7a98840b0769135770e9bf7858cf1a3
This commit is contained in:
kassens (Meta Employee)
2023-11-07 07:10:58 -08:00
committed by Facebook GitHub Bot
parent 016b62c549
commit b561d46b06
@@ -22,7 +22,7 @@ import * as React from 'react';
// require BackHandler so it sets the default handler that exits the app if no listeners respond
import '../Utilities/BackHandler';
type OffscreenType = React.AbstractComponent<{
type ActivityType = React.AbstractComponent<{
mode: 'visible' | 'hidden',
children: React.Node,
}>;
@@ -73,13 +73,13 @@ export default function renderApplication<Props: Object>(
if (useOffscreen && displayMode != null) {
// $FlowFixMe[incompatible-type]
// $FlowFixMe[prop-missing]
const Offscreen: OffscreenType = React.unstable_Offscreen;
const Activity: ActivityType = React.unstable_Activity;
renderable = (
<Offscreen
<Activity
mode={displayMode === DisplayMode.VISIBLE ? 'visible' : 'hidden'}>
{renderable}
</Offscreen>
</Activity>
);
}