From bbbf28fe02f0f7bd1aaf4a3ab2f7cb8db538759a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= <maleckidawid@meta.com>
Date: Fri, 18 Apr 2025 06:59:59 -0700
Subject: [PATCH] Export NewAppScreen from the root (#50801)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50801

New react native projects from react-native-communit/template use components from the `NewAppScreen` which is currently not root exported:

```
import {
  Colors,
  DebugInstructions,
  Header,
  LearnMoreLinks,
  ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
```

This diff adds re-export of the NewAppScreen as a namespace to state the origin of imported components clearly.

Changelog:
[Internal]

Differential Revision: D73242541
---
 .../Libraries/__tests__/__snapshots__/public-api-test.js.snap  | 1 +
 packages/react-native/index.js                                 | 3 +++
 packages/react-native/index.js.flow                            | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
index d64601d1560022..a9b8f559b07da4 100644
--- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
+++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
@@ -9082,6 +9082,7 @@ export type {
   VirtualizedSectionListProps,
 } from \\"./Libraries/Lists/VirtualizedSectionList\\";
 export { default as VirtualizedSectionList } from \\"./Libraries/Lists/VirtualizedSectionList\\";
+export * as NewAppScreen from \\"./Libraries/NewAppScreen\\";
 export { default as AccessibilityInfo } from \\"./Libraries/Components/AccessibilityInfo/AccessibilityInfo\\";
 export type {
   ActionSheetIOSOptions,
diff --git a/packages/react-native/index.js b/packages/react-native/index.js
index 1668f74754e6de..89808cf5f92d6e 100644
--- a/packages/react-native/index.js
+++ b/packages/react-native/index.js
@@ -238,6 +238,9 @@ module.exports = {
   get Networking() {
     return require('./Libraries/Network/RCTNetworking').default;
   },
+  get NewAppScreen() {
+    return require('./Libraries/NewAppScreen');
+  },
   get PanResponder() {
     return require('./Libraries/Interaction/PanResponder').default;
   },
diff --git a/packages/react-native/index.js.flow b/packages/react-native/index.js.flow
index b719e1d9222184..165218d5f3349f 100644
--- a/packages/react-native/index.js.flow
+++ b/packages/react-native/index.js.flow
@@ -318,6 +318,8 @@ export {default as NativeEventEmitter} from './Libraries/EventEmitter/NativeEven
 export {default as NativeModules} from './Libraries/BatchedBridge/NativeModules';
 export {default as Networking} from './Libraries/Network/RCTNetworking';
 
+export * as NewAppScreen from './Libraries/NewAppScreen';
+
 export type {
   PanResponderCallbacks,
   PanResponderGestureState,