diff --git a/change/@office-iss-react-native-win32-98074e3b-7f24-4400-a7e4-daca6e150710.json b/change/@office-iss-react-native-win32-98074e3b-7f24-4400-a7e4-daca6e150710.json new file mode 100644 index 00000000000..fda744bf2df --- /dev/null +++ b/change/@office-iss-react-native-win32-98074e3b-7f24-4400-a7e4-daca6e150710.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate RN Nightly Build 0.80.0-nightly-20250506-3ac16dd6a", + "packageName": "@office-iss/react-native-win32", + "email": "54227869+anupriya13@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-automation-channel-f520c795-6a39-4d20-a6a9-487784b06176.json b/change/@react-native-windows-automation-channel-f520c795-6a39-4d20-a6a9-487784b06176.json new file mode 100644 index 00000000000..9e3409798ca --- /dev/null +++ b/change/@react-native-windows-automation-channel-f520c795-6a39-4d20-a6a9-487784b06176.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Integrate RN Nightly Build 0.80.0-nightly-20250506-3ac16dd6a", + "packageName": "@react-native-windows/automation-channel", + "email": "54227869+anupriya13@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-0b31b288-b7cb-48e2-945e-3d032942ea6c.json b/change/react-native-windows-0b31b288-b7cb-48e2-945e-3d032942ea6c.json new file mode 100644 index 00000000000..8a5b57af97e --- /dev/null +++ b/change/react-native-windows-0b31b288-b7cb-48e2-945e-3d032942ea6c.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate RN Nightly Build 0.80.0-nightly-20250506-3ac16dd6a", + "packageName": "react-native-windows", + "email": "54227869+anupriya13@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index cf75b6eba58..c88646b2f7e 100644 --- a/packages/@office-iss/react-native-win32-tester/overrides.json +++ b/packages/@office-iss/react-native-win32-tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win32/**" ], - "baseVersion": "0.80.0-nightly-20250428-9efcdc091", + "baseVersion": "0.80.0-nightly-20250506-3ac16dd6a", "overrides": [ { "type": "patch", @@ -42,7 +42,7 @@ "type": "derived", "file": "src/js/utils/RNTesterList.win32.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js", - "baseHash": "3b5c8bcdee69293ddce0d515300504979e36f87a" + "baseHash": "aded9dd37f3ac325aa1cc095f6d217114c45a8b9" } ] } \ No newline at end of file diff --git a/packages/@office-iss/react-native-win32-tester/package.json b/packages/@office-iss/react-native-win32-tester/package.json index b36dfd1f522..90b48a9716c 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -19,7 +19,7 @@ "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.293", "react": "19.1.0", - "react-native": "0.80.0-nightly-20250428-9efcdc091" + "react-native": "0.80.0-nightly-20250506-3ac16dd6a" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.293", @@ -30,7 +30,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.80.0-nightly-20250428-9efcdc091", + "react-native": "0.80.0-nightly-20250506-3ac16dd6a", "react-native-platform-override": "^1.9.56", "typescript": "5.0.4" }, diff --git a/packages/@office-iss/react-native-win32-tester/src/js/examples-win32/Theming/ThemingModuleAPI.tsx b/packages/@office-iss/react-native-win32-tester/src/js/examples-win32/Theming/ThemingModuleAPI.tsx index 19f9429bfe3..8759605c8bb 100644 --- a/packages/@office-iss/react-native-win32-tester/src/js/examples-win32/Theming/ThemingModuleAPI.tsx +++ b/packages/@office-iss/react-native-win32-tester/src/js/examples-win32/Theming/ThemingModuleAPI.tsx @@ -24,13 +24,13 @@ const styles = StyleSheet.create({ const Theming = NativeModules.Theming; -const ifModuleAvailable = (wrappedComponent: React.JSX.Element) => { +const ifModuleAvailable = (wrappedComponent: React.ReactElement): React.ReactElement => { return Theming ? wrappedComponent : Theming Native Module not available; }; -const RenderThemeFunction = () => { +const RenderThemeFunction = (): React.ReactElement => { const [, setText] = React.useState(''); - const onChangeText = React.useCallback(t => setText(t), [setText]); + const onChangeText = React.useCallback((t: string) => setText(t), [setText]); return ( Arguments: @@ -39,52 +39,65 @@ const RenderThemeFunction = () => { ); }; -const ThemingMethods: React.FunctionComponent<{}> = () => { +const withBox = ( + key: string, + component: React.ReactElement | React.ReactElement[] +): React.ReactElement => ( + + {key} + <>{component} + +); + +const ThemingMethods: React.FunctionComponent = () => { return ( - {Object.keys(Theming).map((val: string) => { - return typeof Theming[val] === 'function' ? withBox(val, RenderThemeFunction()) : undefined; - })} + <> + {Object.keys(Theming).map((val: string) => + typeof Theming[val] === 'function' ? withBox(val, ) : null + )} + ); }; -const renderNestedObject = (obj: Record) => { +const renderNestedObject = (obj: Record): React.ReactElement => { return ( - {Object.keys(obj).map((val: string) => { - return {val + ': ' + JSON.stringify(obj[val])}; - })} + {Object.keys(obj).map((val: string) => ( + {val + ': ' + JSON.stringify(obj[val])} + ))} ); }; -const renderObject = (obj: Record) => { +const renderObject = (obj: Record): React.ReactElement => { const firstKey = Object.keys(obj)[0]; const formattedOutput = JSON.stringify(obj) .replace(/],/g, '],\n\n') .replace(/:/g, ': ') .replace(/,/g, ', '); - return obj[firstKey] instanceof Array ? {formattedOutput} : renderNestedObject(obj); -}; -const renderThemeObject = (key: string): React.ReactElement => withBox(key, renderObject(Theming[key])); + return obj[firstKey] instanceof Array ? ( + {formattedOutput} + ) : ( + renderNestedObject(obj) + ); +}; -const withBox = (key: string, component: React.ReactNode) => ( - - {key} - {component} - -); +const renderThemeObject = (key: string): React.ReactElement => + withBox(key, renderObject(Theming[key])); -const ThemingConstants: React.FunctionComponent<{}> = () => { +const ThemingConstants: React.FunctionComponent = () => { return ( - {Object.keys(Theming).map((val: string) => { - return typeof Theming[val] === 'object' ? renderThemeObject(val) : undefined; - })} + <> + {Object.keys(Theming).map((val: string) => + typeof Theming[val] === 'object' ? renderThemeObject(val) : null + )} + ); }; @@ -92,15 +105,19 @@ const ThemingConstants: React.FunctionComponent<{}> = () => { export const title = 'Theming Module APIs'; export const displayName = 'Theming Module APIs'; export const description = 'Tests shape of Theming Native Module'; -export const examples = [ - { - title: 'Theming Module Constants', - description: 'All constants', - render: () => ifModuleAvailable(), - }, - { - title: 'Theming Module Methods', - description: 'Method invoker', - render: () => ifModuleAvailable(), - }, - ]; +export const examples: { + title: string; + description: string; + render: () => React.ReactElement; +}[] = [ + { + title: 'Theming Module Constants', + description: 'All constants', + render: (): React.ReactElement => ifModuleAvailable(), + }, + { + title: 'Theming Module Methods', + description: 'Method invoker', + render: (): React.ReactElement => ifModuleAvailable(), + }, +]; diff --git a/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js b/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js index 126239bd050..76ed50c15b0 100644 --- a/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js +++ b/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js @@ -12,6 +12,7 @@ import type {RNTesterModule, RNTesterModuleInfo} from '../types/RNTesterTypes'; +import * as RNTesterListFbInternal from './RNTesterListFbInternal'; import ReactNativeFeatureFlags from 'react-native/Libraries/ReactNative/ReactNativeFeatureFlags'; const Components: Array = [ @@ -159,6 +160,7 @@ const Components: Array = [ module: require('../examples/OSSLibraryExample/OSSLibraryExample'), }, */ + ...RNTesterListFbInternal.Components, ]; const APIs: Array = ([ @@ -233,14 +235,6 @@ const APIs: Array = ([ .default, }, // Only show the link for the example if the API is available. - // $FlowExpectedError[cannot-resolve-name] - typeof IntersectionObserver === 'function' - ? { - key: 'IntersectionObserver', - category: 'UI', - module: require('../examples/IntersectionObserver/IntersectionObserverIndex'), - } - : null, { key: 'InvalidPropsExample', module: require('../examples/InvalidProps/InvalidPropsExample'), @@ -265,14 +259,6 @@ const APIs: Array = ([ category: 'UI', module: require('../examples/Layout/LayoutExample'), }, - // $FlowExpectedError[cannot-resolve-name] - typeof MutationObserver === 'function' - ? { - key: 'MutationObserver', - category: 'UI', - module: require('../examples/MutationObserver/MutationObserverIndex'), - } - : null, { key: 'NativeAnimationsExample', category: 'UI', @@ -380,11 +366,7 @@ const APIs: Array = ([ category: 'Basic', module: require('../examples/TurboModule/TurboCxxModuleExample'), }, - { - key: 'PerformanceApiExample', - category: 'Basic', - module: require('../examples/Performance/PerformanceApiExample'), - }, + ...RNTesterListFbInternal.APIs, ]: Array).filter(Boolean); if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index 4b336c425b0..d7e5a6eb497 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -5,6 +5,9 @@ .*/*[.]macos.js .*/*[.]windesktop.js +; Ignore fb_internal modules +/packages/react-native/src/fb_internal/.* + ; These modules have base components and win32 versions. ; Ideally we'd delete the base versions of files that had .win32 overrides as part of the ; initRNLibraries build step @@ -39,6 +42,10 @@ /Libraries/LogBox/UI/LogBoxInspectorReactFrames.js /Libraries/LogBox/UI/LogBoxStyle.js +/IntegrationTests/ImageCachePolicyTest.js +/IntegrationTests/LayoutEventsTest.js +/IntegrationTests/IntegrationTestsApp.js + ; Ignore react-native files in node_modules since they are copied into project root .*/node_modules/react-native/.* @@ -167,4 +174,4 @@ untyped-import untyped-type-import [version] -^0.268.0 +^0.269.1 diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index cd38f41e4a7..794ea150210 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -7,13 +7,13 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.80.0-nightly-20250428-9efcdc091", + "baseVersion": "0.80.0-nightly-20250506-3ac16dd6a", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "d274ca7bb384b334c5b2ee0827726e7a3d6c98c9" + "baseHash": "70ed729d5f52c241530e8459cc40263d4e9fa9c0" }, { "type": "derived", @@ -114,7 +114,7 @@ "type": "derived", "file": "src-win/Libraries/Components/TextInput/TextInput.win32.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "4b3128471dd0d362e9828df8937f708d53694e12" + "baseHash": "9965c0079652083ab549bc2799eb9528b56a1b2d" }, { "type": "patch", @@ -183,13 +183,13 @@ "type": "derived", "file": "src-win/Libraries/Components/View/ViewAccessibility.d.ts", "baseFile": "packages/react-native/Libraries/Components/View/ViewAccessibility.d.ts", - "baseHash": "d97e29f01e57cc2b0de209a03f8584b984cfe190" + "baseHash": "1e4e3a89397960e8f08b86be62496473829c0ac3" }, { "type": "derived", "file": "src-win/Libraries/Components/View/ViewAccessibility.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/ViewAccessibility.js", - "baseHash": "c30dab3926869e84edafebd485e78637d69ccd61" + "baseHash": "04981261b2ed61b31bfbb396478bb6b103d99253" }, { "type": "derived", @@ -329,7 +329,7 @@ "type": "derived", "file": "src-win/Libraries/NativeComponent/BaseViewConfig.win32.js", "baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js", - "baseHash": "3ba8fe1a60d744e057e856bc43e2df28f4fd7f66" + "baseHash": "b520e2bdb2be31bdb6ad7e3769dbe69168870c8c" }, { "type": "copy", diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index f4d18dbe766..b949a5af51a 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -30,19 +30,19 @@ "@react-native-community/cli-platform-android": "17.0.0", "@react-native-community/cli-platform-ios": "17.0.0", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.80.0-nightly-20250428-9efcdc091", - "@react-native/codegen": "0.80.0-nightly-20250428-9efcdc091", - "@react-native/community-cli-plugin": "0.80.0-nightly-20250428-9efcdc091", - "@react-native/gradle-plugin": "0.80.0-nightly-20250428-9efcdc091", - "@react-native/js-polyfills": "0.80.0-nightly-20250428-9efcdc091", - "@react-native/normalize-colors": "0.80.0-nightly-20250428-9efcdc091", - "@react-native/virtualized-lists": "0.80.0-nightly-20250428-9efcdc091", + "@react-native/assets-registry": "0.80.0-nightly-20250506-3ac16dd6a", + "@react-native/codegen": "0.80.0-nightly-20250506-3ac16dd6a", + "@react-native/community-cli-plugin": "0.80.0-nightly-20250506-3ac16dd6a", + "@react-native/gradle-plugin": "0.80.0-nightly-20250506-3ac16dd6a", + "@react-native/js-polyfills": "0.80.0-nightly-20250506-3ac16dd6a", + "@react-native/normalize-colors": "0.80.0-nightly-20250506-3ac16dd6a", + "@react-native/virtualized-lists": "0.80.0-nightly-20250506-3ac16dd6a", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "art": "^0.10.0", "babel-jest": "^29.7.0", - "babel-plugin-syntax-hermes-parser": "0.25.1", + "babel-plugin-syntax-hermes-parser": "0.28.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", @@ -52,8 +52,8 @@ "invariant": "^2.2.4", "jest-environment-node": "^29.7.0", "memoize-one": "^5.0.0", - "metro-runtime": "^0.82.0", - "metro-source-map": "^0.82.0", + "metro-runtime": "^0.82.2", + "metro-source-map": "^0.82.2", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", @@ -62,7 +62,7 @@ "react-devtools-core": "^6.1.1", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", - "scheduler": "0.25.0", + "scheduler": "0.26.0", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", @@ -72,7 +72,7 @@ "devDependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", - "@react-native/metro-config": "0.80.0-nightly-20250428-9efcdc091", + "@react-native/metro-config": "0.80.0-nightly-20250506-3ac16dd6a", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.36", "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.40", @@ -88,14 +88,14 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "19.1.0", - "react-native": "0.80.0-nightly-20250428-9efcdc091", + "react-native": "0.80.0-nightly-20250506-3ac16dd6a", "react-native-platform-override": "^1.9.56", "typescript": "5.0.4" }, "peerDependencies": { - "@types/react": "^19.0.0", + "@types/react": "^19.1.0", "react": "^19.1.0", - "react-native": "0.80.0-nightly-20250428-9efcdc091" + "react-native": "0.80.0-nightly-20250506-3ac16dd6a" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index a48818aaab1..66e1db5b84b 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -32,7 +32,7 @@ "just-scripts": "^1.3.2", "prettier": "2.8.8", "react": "19.1.0", - "react-native": "0.80.0-nightly-20250428-9efcdc091", + "react-native": "0.80.0-nightly-20250506-3ac16dd6a", "react-native-windows": "^0.0.0-canary.977", "typescript": "5.0.4" }, diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index ce5e1ff905d..a7ccc92ac6d 100644 --- a/packages/@react-native-windows/tester/overrides.json +++ b/packages/@react-native-windows/tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win/**" ], - "baseVersion": "0.80.0-nightly-20250428-9efcdc091", + "baseVersion": "0.80.0-nightly-20250506-3ac16dd6a", "overrides": [ { "type": "copy", @@ -43,35 +43,35 @@ "type": "patch", "file": "src/js/examples/FlatList/BaseFlatListExample.windows.js", "baseFile": "packages/rn-tester/js/examples/FlatList/BaseFlatListExample.js", - "baseHash": "1f762573bd6dd3a1a1c8b7767eeb6ce923785eba", + "baseHash": "44b784dbde64d0ca1616f0e31a07f232939d8dd7", "issue": 12869 }, { "type": "patch", "file": "src/js/examples/FlatList/FlatList-basic.windows.js", "baseFile": "packages/rn-tester/js/examples/FlatList/FlatList-basic.js", - "baseHash": "ac75910f0e9c21569b27934385279f2ac34b02bf", + "baseHash": "a10d3f1b947f00cd11f33644e374d04bf5417a04", "issue": 12869 }, { "type": "copy", "file": "src/js/examples/FlatList/FlatList-multiColumn.windows.js", "baseFile": "packages/rn-tester/js/examples/FlatList/FlatList-multiColumn.js", - "baseHash": "913bcd6ecd22d5e0f4cae177c89756b8396096fd", + "baseHash": "51da04f9ee49f1a5fd857db17361443636d73bca", "issue": 12869 }, { "type": "patch", "file": "src/js/examples/FlatList/FlatList-nested.windows.js", "baseFile": "packages/rn-tester/js/examples/FlatList/FlatList-nested.js", - "baseHash": "e77c19ae4ead3fefaa949524dfcae28e439a022c", + "baseHash": "c5f4c76741ff490c10c4c18db45bacfecd1b8a12", "issue": 12869 }, { "type": "patch", "file": "src/js/examples/FlatList/FlatList-stickyHeaders.windows.js", "baseFile": "packages/rn-tester/js/examples/FlatList/FlatList-stickyHeaders.js", - "baseHash": "5cc295fd2a56b93b0c12916b333fe5862173f338" + "baseHash": "cfa86dc07ee3a2f17e589939a4fef982ff2c1b72" }, { "type": "platform", @@ -85,7 +85,7 @@ "type": "patch", "file": "src/js/examples/Image/ImageExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Image/ImageExample.js", - "baseHash": "9fa7c2a5569d388509819fc8c4a08b50dd3937d1", + "baseHash": "20dec87a4f2c4c098adf9e3becc0969fb2b3036c", "issue": 12869 }, { @@ -98,7 +98,7 @@ "type": "patch", "file": "src/js/examples/Modal/ModalPresentation.windows.js", "baseFile": "packages/rn-tester/js/examples/Modal/ModalPresentation.js", - "baseHash": "85f44b8ecf18784f6a0088df636b2b9742546b09" + "baseHash": "93c88f75903188f1b5671a288fbf6eb333ea8acb" }, { "type": "patch", @@ -136,7 +136,7 @@ "type": "patch", "file": "src/js/examples/TurboModule/SampleTurboModuleExample.windows.js", "baseFile": "packages/rn-tester/js/examples/TurboModule/SampleTurboModuleExample.js", - "baseHash": "5cfdbaaa81a57c5611955cce6f484eca7ad7a355" + "baseHash": "a005538f6ea294fb44d0f6265c1bc75bd893ab56" }, { "type": "patch", @@ -155,7 +155,7 @@ "type": "derived", "file": "src/js/utils/RNTesterList.windows.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js", - "baseHash": "3b5c8bcdee69293ddce0d515300504979e36f87a" + "baseHash": "aded9dd37f3ac325aa1cc095f6d217114c45a8b9" } ] } \ No newline at end of file diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index 40b41f4df30..f1191580ac6 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -19,12 +19,13 @@ "peerDependencies": { "@react-native-picker/picker": "2.11.0", "react": "19.1.0", - "react-native": "0.80.0-nightly-20250428-9efcdc091", + "react-native": "0.80.0-nightly-20250506-3ac16dd6a", "react-native-windows": "^0.0.0-canary.977", "react-native-xaml": "^0.0.80" }, "devDependencies": { "@react-native/tester": "0.80.0-main", + "@react-native/new-app-screen": "0.80.0-nightly-20250506-3ac16dd6a", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.36", "@rnw-scripts/just-task": "2.3.54", @@ -32,7 +33,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.80.0-nightly-20250428-9efcdc091", + "react-native": "0.80.0-nightly-20250506-3ac16dd6a", "react-native-platform-override": "^1.9.56", "react-native-windows": "^0.0.0-canary.977", "typescript": "5.0.4" @@ -40,4 +41,4 @@ "engines": { "node": ">= 18" } -} +} \ No newline at end of file diff --git a/packages/@react-native-windows/tester/src/js/examples-win/Keyboard/KeyboardFocusExample.windows.tsx b/packages/@react-native-windows/tester/src/js/examples-win/Keyboard/KeyboardFocusExample.windows.tsx index ccfb3448da0..63d1baa7be1 100644 --- a/packages/@react-native-windows/tester/src/js/examples-win/Keyboard/KeyboardFocusExample.windows.tsx +++ b/packages/@react-native-windows/tester/src/js/examples-win/Keyboard/KeyboardFocusExample.windows.tsx @@ -60,11 +60,9 @@ interface IKeyboardFocusComponentState { const pickerRef = React.createRef>(); const viewWindowsRef = React.createRef(); const textInputRef = React.createRef(); -const textInputRef2 = React.createRef(); -const touchableHighlightRef = - React.createRef>(); -const touchableOpacityRef = - React.createRef>(); +const textInputRef2 = React.createRef(); +const touchableHighlightRef = React.createRef(); +const touchableOpacityRef = React.createRef(); const touchableWithoutFeedbackRef = React.createRef(); class KeyboardFocusExample extends React.Component< @@ -182,35 +180,32 @@ class KeyboardFocusExample extends React.Component< }; private readonly _selectionChanged = (selected: string) => { + this.setState({selected}); // Update selected state + switch (selected) { case 'View': - viewWindowsRef.current && viewWindowsRef.current.focus(); + viewWindowsRef.current?.focus(); break; case 'Picker': // pickerRef.current && pickerRef.current.focus(); break; case 'TextInput': - textInputRef.current && textInputRef.current.focus(); - if (textInputRef.current) { - textInputRef.current.focus(); - setTimeout(() => { - textInputRef2.current && textInputRef2.current.blur(); - }, 10000); - } + textInputRef.current?.focus(); + setTimeout(() => { + textInputRef2.current?.blur(); + }, 10000); break; case 'TextInput2': - if (textInputRef2.current) { - textInputRef2.current.focus(); - setTimeout(() => { - textInputRef2.current && textInputRef2.current.blur(); - }, 10000); - } + textInputRef2.current?.focus(); + setTimeout(() => { + textInputRef2.current?.blur(); + }, 10000); break; case 'TouchableHighlight': - touchableHighlightRef.current && touchableHighlightRef.current.focus(); + (touchableHighlightRef.current as any)?.focus?.(); break; case 'TouchableOpacity': - touchableOpacityRef.current && touchableOpacityRef.current.focus(); + (touchableOpacityRef.current as any)?.focus?.(); break; case 'TouchableWithoutFeedback': // TouchableWithoutFeedback doesn't have a focus method, since it doesn't have NativeMethodsMixin applied diff --git a/packages/@react-native-windows/tester/src/js/examples/FlatList/BaseFlatListExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/FlatList/BaseFlatListExample.windows.js index 8721de395b9..d5548c7e503 100644 --- a/packages/@react-native-windows/tester/src/js/examples/FlatList/BaseFlatListExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/FlatList/BaseFlatListExample.windows.js @@ -8,7 +8,7 @@ * @format */ -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; +import type {ListRenderItemInfo} from 'react-native'; import * as React from 'react'; import { diff --git a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-basic.windows.js b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-basic.windows.js index 6eca8176693..68499ad54f0 100644 --- a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-basic.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-basic.windows.js @@ -12,9 +12,9 @@ import type {Item} from '../../components/ListExampleShared'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; +import type {ListRenderItemInfo} from 'react-native'; import type {AnimatedComponentType} from 'react-native/Libraries/Animated/createAnimatedComponent'; import typeof FlatListType from 'react-native/Libraries/Lists/FlatList'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; import { FooterComponent, diff --git a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js index 53ec5939241..45cdacbb035 100644 --- a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js @@ -12,7 +12,7 @@ import type {Item} from '../../components/ListExampleShared'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; +import type {ListRenderItemInfo} from 'react-native'; import { FooterComponent, diff --git a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js index d30231da9c0..66b06ea0721 100644 --- a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js @@ -11,8 +11,8 @@ 'use strict'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; +import type {ListRenderItemInfo} from 'react-native'; import type {ViewToken} from 'react-native/Libraries/Lists/ViewabilityHelper'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; import RNTesterPage from '../../components/RNTesterPage'; import RNTesterText from '../../components/RNTesterText'; diff --git a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-stickyHeaders.windows.js b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-stickyHeaders.windows.js index 68132e39a5c..1f5dea3c947 100644 --- a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-stickyHeaders.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-stickyHeaders.windows.js @@ -9,7 +9,7 @@ */ import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; +import type {ListRenderItemInfo} from 'react-native'; import * as React from 'react'; import {FlatList, StyleSheet, Text, View} from 'react-native'; diff --git a/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js index 6a481c7d6f1..d282ae8b94c 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js @@ -11,15 +11,13 @@ 'use strict'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type {ImageProps} from 'react-native/Libraries/Image/ImageProps'; -import type {LayoutChangeEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {ImageProps, LayoutChangeEvent} from 'react-native'; import RNTesterButton from '../../components/RNTesterButton'; import RNTesterText from '../../components/RNTesterText'; import ImageCapInsetsExample from './ImageCapInsetsExample'; import React from 'react'; import {Image, ImageBackground, StyleSheet, Text, View} from 'react-native'; -import * as ReactNativeFeatureFlags from 'react-native/src/private/featureflags/ReactNativeFeatureFlags'; const IMAGE1 = 'https://www.facebook.com/assets/fb_lite_messaging/E2EE-settings@3x.png'; diff --git a/packages/@react-native-windows/tester/src/js/examples/Modal/ModalPresentation.windows.js b/packages/@react-native-windows/tester/src/js/examples/Modal/ModalPresentation.windows.js index 947224c7040..f5569c20f53 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Modal/ModalPresentation.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Modal/ModalPresentation.windows.js @@ -11,7 +11,7 @@ /* eslint-disable no-alert */ import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type {ModalProps} from 'react-native/Libraries/Modal/Modal'; +import type {ModalProps} from 'react-native'; import RNTesterButton from '../../components/RNTesterButton'; import RNTesterText from '../../components/RNTesterText'; diff --git a/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js index e3b0f4cfe0e..b27e83cebbf 100644 --- a/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js @@ -8,8 +8,7 @@ * @flow strict-local */ -import type {RootTag} from 'react-native/Libraries/ReactNative/RootTag'; -import type {EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter'; +import type {EventSubscription, RootTag} from 'react-native'; import RNTesterText from '../../components/RNTesterText'; import styles from './TurboModuleExampleCommon'; diff --git a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js index e98f91f278f..18b1c2a14b4 100644 --- a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js +++ b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js @@ -9,6 +9,7 @@ import type {RNTesterModule, RNTesterModuleInfo} from '../types/RNTesterTypes'; +import * as RNTesterListFbInternal from './RNTesterListFbInternal'; import ReactNativeFeatureFlags from 'react-native/Libraries/ReactNative/ReactNativeFeatureFlags'; const Components: Array = [ @@ -216,6 +217,7 @@ const Components: Array = [ module: require('../examples/OSSLibraryExample/OSSLibraryExample'), }, */ + ...RNTesterListFbInternal.Components, ]; const APIs: Array = ([ @@ -301,15 +303,6 @@ const APIs: Array = ([ .default, }, // Only show the link for the example if the API is available. - // $FlowExpectedError[cannot-resolve-name] - typeof IntersectionObserver === 'function' - ? { - key: 'IntersectionObserver', - category: 'UI', - module: require('../examples/IntersectionObserver/IntersectionObserverIndex'), - } - : null, - // E2E Tests failing when this test is enabled // { // key: 'InvalidPropsExample', @@ -344,14 +337,6 @@ const APIs: Array = ([ category: 'UI', module: require('../examples/Layout/LayoutExample'), }, - // $FlowExpectedError[cannot-resolve-name] - typeof MutationObserver === 'function' - ? { - key: 'MutationObserver', - category: 'UI', - module: require('../examples/MutationObserver/MutationObserverIndex'), - } - : null, { key: 'MouseExample', category: 'Basic', @@ -471,11 +456,7 @@ const APIs: Array = ([ category: 'Basic', module: require('../examples/TurboModule/TurboCxxModuleExample'), }, - { - key: 'PerformanceApiExample', - category: 'Basic', - module: require('../examples/Performance/PerformanceApiExample'), - }, + ...RNTesterListFbInternal.APIs, ]: Array).filter(Boolean); if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index 936315fa59b..2663e907053 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.80.0-nightly-20250428-9efcdc091", + "baseVersion": "0.80.0-nightly-20250506-3ac16dd6a", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "1555093b05c146103ef4e9add6fe2c2c104ff225" + "baseHash": "4fad7b8d451333c0ccee6561c12a320d0556810f" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index b78b2cc9bb1..e7dbdae196b 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -48,8 +48,8 @@ "@babel/preset-flow": "^7.24.7", "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.7.0", - "@react-native/metro-babel-transformer": "0.80.0-nightly-20250428-9efcdc091", - "@react-native/metro-config": "0.80.0-nightly-20250428-9efcdc091", + "@react-native/metro-babel-transformer": "0.80.0-nightly-20250506-3ac16dd6a", + "@react-native/metro-config": "0.80.0-nightly-20250506-3ac16dd6a", "@tsconfig/node18": "1.0.1", "@types/react": "^19.0.0", "@typescript-eslint/parser": "^7.1.1", @@ -77,7 +77,7 @@ "eslint-plugin-redundant-undefined": "^0.4.0", "eslint-plugin-relay": "^1.8.3", "flow-api-translator": "0.28.1", - "flow-bin": "^0.268.0", + "flow-bin": "^0.269.1", "glob": "^7.1.1", "hermes-eslint": "0.28.1", "hermes-transform": "0.28.1", diff --git a/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js b/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js index e7a63bf4531..ea136a67b8d 100644 --- a/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js +++ b/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js @@ -8,28 +8,20 @@ * @format */ -import type {HostComponent} from 'react-native'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import type { - BubblingEventHandler, - Double, - Float, - Int32, -} from 'react-native/Libraries/Types/CodegenTypes'; +import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import * as React from 'react'; -import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import {codegenNativeCommands, codegenNativeComponent} from 'react-native'; type Event = $ReadOnly<{ - values: $ReadOnlyArray, + values: $ReadOnlyArray, boolValues: $ReadOnlyArray, - floats: $ReadOnlyArray, - doubles: $ReadOnlyArray, + floats: $ReadOnlyArray, + doubles: $ReadOnlyArray, yesNos: $ReadOnlyArray<'yep' | 'nope'>, strings: $ReadOnlyArray, - latLons: $ReadOnlyArray<{lat: Double, lon: Double}>, - multiArrays: $ReadOnlyArray<$ReadOnlyArray>, + latLons: $ReadOnlyArray<{lat: CodegenTypes.Double, lon: CodegenTypes.Double}>, + multiArrays: $ReadOnlyArray<$ReadOnlyArray>, }>; type LegacyStyleEvent = $ReadOnly<{ @@ -38,12 +30,12 @@ type LegacyStyleEvent = $ReadOnly<{ type NativeProps = $ReadOnly<{ ...ViewProps, - opacity?: Float, - values: $ReadOnlyArray, + opacity?: CodegenTypes.Float, + values: $ReadOnlyArray, // Events - onIntArrayChanged?: ?BubblingEventHandler, - onLegacyStyleEvent?: ?BubblingEventHandler< + onIntArrayChanged?: ?CodegenTypes.BubblingEventHandler, + onLegacyStyleEvent?: ?CodegenTypes.BubblingEventHandler< LegacyStyleEvent, 'alternativeLegacyName', >, diff --git a/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js b/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js index ed9bfa0f781..f29bf8bc780 100644 --- a/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js +++ b/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js @@ -8,8 +8,7 @@ * @format */ -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import type {EventEmitter} from 'react-native/Libraries/Types/CodegenTypes'; +import type {CodegenTypes, TurboModule} from 'react-native'; import {TurboModuleRegistry} from 'react-native'; @@ -77,11 +76,11 @@ export type CustomDeviceEvent = { }; export interface Spec extends TurboModule { - +onPress: EventEmitter; - +onClick: EventEmitter; - +onChange: EventEmitter; - +onSubmit: EventEmitter; - +onEvent: EventEmitter; + +onPress: CodegenTypes.EventEmitter; + +onClick: CodegenTypes.EventEmitter; + +onChange: CodegenTypes.EventEmitter; + +onSubmit: CodegenTypes.EventEmitter; + +onEvent: CodegenTypes.EventEmitter; +getArray: (arg: Array) => Array; +getBool: (arg: boolean) => boolean; +getConstants: () => ConstantsStruct; diff --git a/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js b/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js index 9065b866d20..a04cca85a83 100644 --- a/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js +++ b/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js @@ -8,12 +8,11 @@ * @format */ -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; +import type {CodegenTypes, TurboModule} from 'react-native'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; +import {TurboModuleRegistry} from 'react-native'; -export type ScreenshotManagerOptions = UnsafeObject; +export type ScreenshotManagerOptions = CodegenTypes.UnsafeObject; export interface Spec extends TurboModule { +getConstants: () => {}; diff --git a/packages/@react-native/tester/ReportFullyDrawnView/ReportFullyDrawnViewNativeComponent.js b/packages/@react-native/tester/ReportFullyDrawnView/ReportFullyDrawnViewNativeComponent.js index 232e9c07643..fe778e11158 100644 --- a/packages/@react-native/tester/ReportFullyDrawnView/ReportFullyDrawnViewNativeComponent.js +++ b/packages/@react-native/tester/ReportFullyDrawnView/ReportFullyDrawnViewNativeComponent.js @@ -9,9 +9,9 @@ */ import type {HostComponent} from 'react-native'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {ViewProps} from 'react-native'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import {codegenNativeComponent} from 'react-native'; type NativeProps = $ReadOnly<{ ...ViewProps, diff --git a/packages/@react-native/tester/js/components/RNTOption.js b/packages/@react-native/tester/js/components/RNTOption.js index b8026947d01..3f0c3535600 100644 --- a/packages/@react-native/tester/js/components/RNTOption.js +++ b/packages/@react-native/tester/js/components/RNTOption.js @@ -10,8 +10,8 @@ 'use strict'; +import type {GestureResponderEvent} from 'react-native'; import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; -import type {GestureResponderEvent} from 'react-native/Libraries/Types/CoreEventTypes'; import {RNTesterThemeContext} from './RNTesterTheme'; import * as React from 'react'; diff --git a/packages/@react-native/tester/js/components/RNTesterButton.js b/packages/@react-native/tester/js/components/RNTesterButton.js index f63d76133b4..2ae13b5a8ff 100644 --- a/packages/@react-native/tester/js/components/RNTesterButton.js +++ b/packages/@react-native/tester/js/components/RNTesterButton.js @@ -10,7 +10,7 @@ 'use strict'; -import type {GestureResponderEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {GestureResponderEvent} from 'react-native'; import React from 'react'; import {Pressable, StyleSheet, Text} from 'react-native'; diff --git a/packages/@react-native/tester/js/components/RNTesterText.js b/packages/@react-native/tester/js/components/RNTesterText.js index 82cc99f5427..51bd4f4ea05 100644 --- a/packages/@react-native/tester/js/components/RNTesterText.js +++ b/packages/@react-native/tester/js/components/RNTesterText.js @@ -8,7 +8,7 @@ * @format */ -import type {TextProps} from 'react-native/Libraries/Text/TextProps'; +import type {TextProps} from 'react-native'; import {RNTesterThemeContext} from './RNTesterTheme'; import React, {useContext, useMemo} from 'react'; diff --git a/packages/@react-native/tester/js/components/RNTesterTheme.js b/packages/@react-native/tester/js/components/RNTesterTheme.js index 9c2a77ca894..8cc4cf6f0a7 100644 --- a/packages/@react-native/tester/js/components/RNTesterTheme.js +++ b/packages/@react-native/tester/js/components/RNTesterTheme.js @@ -8,8 +8,7 @@ * @format */ -import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; -import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; +import type {ColorValue, ImageSource} from 'react-native'; import * as React from 'react'; import {Appearance} from 'react-native'; diff --git a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js index 6c251bff161..d7c4b9e89de 100644 --- a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js +++ b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js @@ -10,8 +10,7 @@ 'use strict'; -import type {GestureResponderEvent} from 'react-native/Libraries/Types/CoreEventTypes'; -import type {EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter'; +import type {EventSubscription, GestureResponderEvent} from 'react-native'; import RNTesterBlock from '../../components/RNTesterBlock'; import RNTesterText from '../../components/RNTesterText'; diff --git a/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExChained.js b/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExChained.js index a0555bb872a..e49026d3d34 100644 --- a/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExChained.js +++ b/packages/@react-native/tester/js/examples/AnimatedGratuitousApp/AnExChained.js @@ -10,8 +10,10 @@ 'use strict'; -import type {PanResponderGestureState} from 'react-native/Libraries/Interaction/PanResponder'; -import type {GestureResponderEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type { + GestureResponderEvent, + PanResponderGestureState, +} from 'react-native'; import React from 'react'; import {Animated, PanResponder, StyleSheet, View} from 'react-native'; diff --git a/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js b/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js index 3b5f269ff43..daff14cee3a 100644 --- a/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js +++ b/packages/@react-native/tester/js/examples/Appearance/AppearanceExample.js @@ -8,7 +8,7 @@ * @flow */ -import type {ColorSchemeName} from 'react-native/Libraries/Utilities/NativeAppearance'; +import type {ColorSchemeName} from 'react-native'; import RNTesterText from '../../components/RNTesterText'; import {RNTesterThemeContext, themes} from '../../components/RNTesterTheme'; diff --git a/packages/@react-native/tester/js/examples/Experimental/Compatibility/ManyPointersPropertiesExample.js b/packages/@react-native/tester/js/examples/Experimental/Compatibility/ManyPointersPropertiesExample.js index 469410c890f..c11dc11cdc4 100644 --- a/packages/@react-native/tester/js/examples/Experimental/Compatibility/ManyPointersPropertiesExample.js +++ b/packages/@react-native/tester/js/examples/Experimental/Compatibility/ManyPointersPropertiesExample.js @@ -9,7 +9,7 @@ */ import type {RNTesterModuleExample} from '../../../types/RNTesterTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import * as React from 'react'; import {StyleSheet, Text, View} from 'react-native'; diff --git a/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestEventRecorder.js b/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestEventRecorder.js index 1dcedbd4d23..3cc360bafac 100644 --- a/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestEventRecorder.js +++ b/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestEventRecorder.js @@ -8,7 +8,7 @@ * @flow */ -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {ViewProps} from 'react-native'; import {useMemo} from 'react'; diff --git a/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestResultView.js b/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestResultView.js index 1b220c50258..4458a2c63a5 100644 --- a/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestResultView.js +++ b/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestResultView.js @@ -12,11 +12,8 @@ import type { PlatformTestResult, PlatformTestResultStatus, } from './RNTesterPlatformTestTypes'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; -import type { - TextStyle, - ViewStyleProp, -} from 'react-native/Libraries/StyleSheet/StyleSheet'; +import type {ListRenderItemInfo, TextStyle} from 'react-native'; +import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; import RNTesterPlatformTestMinimizedResultView from './RNTesterPlatformTestMinimizedResultView'; import RNTesterPlatformTestResultsText from './RNTesterPlatformTestResultsText'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js index 9335ce8cfe0..b407a5a9122 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js @@ -9,7 +9,7 @@ */ import type {EventOccurrence} from './PointerEventSupport'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import {EventTracker} from './PointerEventSupport'; import * as React from 'react'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesHoverablePointers.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesHoverablePointers.js index 9a1d8d0513c..23de1e43909 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesHoverablePointers.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesHoverablePointers.js @@ -9,11 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {HostInstance} from 'react-native'; -import type { - LayoutRectangle, - PointerEvent, -} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {HostInstance, LayoutRectangle, PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import {check_PointerEvent, useTestEventHandler} from './PointerEventSupport'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesNoHoverPointers.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesNoHoverPointers.js index e55a27b8430..58efb42a041 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesNoHoverPointers.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAttributesNoHoverPointers.js @@ -9,11 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {HostInstance} from 'react-native'; -import type { - LayoutRectangle, - PointerEvent, -} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {HostInstance, LayoutRectangle, PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import {check_PointerEvent, useTestEventHandler} from './PointerEventSupport'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js index d5db79dc457..920f2884263 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js @@ -10,7 +10,7 @@ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; import type {ElementRef} from 'react'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import * as React from 'react'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouch.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouch.js index 627d913990e..de7765ce7d7 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouch.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouch.js @@ -10,7 +10,7 @@ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; import type {PlatformTestContext} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import {check_PointerEvent} from './PointerEventSupport'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js index 7db11831df7..b1433c8fcea 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js @@ -10,7 +10,7 @@ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; import type {EventOccurrence, EventTrackerProps} from './PointerEventSupport'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {ViewProps} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import {EventTracker, mkEvent} from './PointerEventSupport'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventLayoutChangeShouldFirePointerOver.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventLayoutChangeShouldFirePointerOver.js index 27c9567e93e..398cc3dcf44 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventLayoutChangeShouldFirePointerOver.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventLayoutChangeShouldFirePointerOver.js @@ -9,7 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import * as React from 'react'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerCancelTouch.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerCancelTouch.js index 36cca7e7ce6..8262ab702d2 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerCancelTouch.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerCancelTouch.js @@ -9,7 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import {check_PointerEvent} from './PointerEventSupport'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMove.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMove.js index 49fbc258439..fad08cd6954 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMove.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMove.js @@ -11,7 +11,7 @@ // adapted from https://github.com/web-platform-tests/wpt/blob/master/pointerevents/pointerevent_pointermove.html import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import {useTestEventHandler} from './PointerEventSupport'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveEventOrder.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveEventOrder.js index d5267dfea7b..232d145beee 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveEventOrder.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveEventOrder.js @@ -9,7 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import RNTesterPlatformTestEventRecorder from '../PlatformTest/RNTesterPlatformTestEventRecorder'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveOnChordedMouseButton.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveOnChordedMouseButton.js index 7956a7d16fb..bba7ccc9748 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveOnChordedMouseButton.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerMoveOnChordedMouseButton.js @@ -9,7 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import * as React from 'react'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerOverOut.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerOverOut.js index 9a77b8fd117..ce5de978815 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerOverOut.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPointerOverOut.js @@ -9,8 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {HostInstance} from 'react-native'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {HostInstance, PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import * as React from 'react'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPrimaryTouchPointer.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPrimaryTouchPointer.js index 24dff3c6baa..a9be730348d 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPrimaryTouchPointer.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventPrimaryTouchPointer.js @@ -9,7 +9,7 @@ */ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent} from 'react-native'; import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest'; import {useTestEventHandler} from './PointerEventSupport'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventSupport.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventSupport.js index d65b88ba21c..260c65ea342 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventSupport.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventSupport.js @@ -9,8 +9,7 @@ */ import type {PlatformTestHarness} from '../PlatformTest/RNTesterPlatformTestTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent, ViewProps} from 'react-native'; import * as React from 'react'; import {useMemo} from 'react'; diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventsEventfulView.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventsEventfulView.js index 4f8ede7591f..27e75cedc01 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventsEventfulView.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventsEventfulView.js @@ -8,8 +8,7 @@ * @flow */ -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {PointerEvent, ViewProps} from 'react-native'; import * as React from 'react'; import {StyleSheet, Text, View} from 'react-native'; diff --git a/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js b/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js index 0e75103d36a..a325b8a1f82 100644 --- a/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js +++ b/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js @@ -8,7 +8,7 @@ * @format */ -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; +import type {ListRenderItemInfo} from 'react-native'; import * as React from 'react'; import { diff --git a/packages/@react-native/tester/js/examples/FlatList/FlatList-basic.js b/packages/@react-native/tester/js/examples/FlatList/FlatList-basic.js index 37ec319a7f9..2b23cb29e4a 100644 --- a/packages/@react-native/tester/js/examples/FlatList/FlatList-basic.js +++ b/packages/@react-native/tester/js/examples/FlatList/FlatList-basic.js @@ -12,8 +12,7 @@ import type {Item} from '../../components/ListExampleShared'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type FlatList from 'react-native/Libraries/Lists/FlatList'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; +import type {FlatList, ListRenderItemInfo} from 'react-native'; import { FooterComponent, diff --git a/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js b/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js index 53ec5939241..45cdacbb035 100644 --- a/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js +++ b/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js @@ -12,7 +12,7 @@ import type {Item} from '../../components/ListExampleShared'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; +import type {ListRenderItemInfo} from 'react-native'; import { FooterComponent, diff --git a/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js b/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js index 4386b4b7202..9d2c018366c 100644 --- a/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js +++ b/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js @@ -11,8 +11,8 @@ 'use strict'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; +import type {ListRenderItemInfo} from 'react-native'; import type {ViewToken} from 'react-native/Libraries/Lists/ViewabilityHelper'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; import RNTesterPage from '../../components/RNTesterPage'; import RNTesterText from '../../components/RNTesterText'; diff --git a/packages/@react-native/tester/js/examples/FlatList/FlatList-stickyHeaders.js b/packages/@react-native/tester/js/examples/FlatList/FlatList-stickyHeaders.js index b6bace9f658..0165e382a62 100644 --- a/packages/@react-native/tester/js/examples/FlatList/FlatList-stickyHeaders.js +++ b/packages/@react-native/tester/js/examples/FlatList/FlatList-stickyHeaders.js @@ -9,7 +9,7 @@ */ import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type {ListRenderItemInfo} from 'react-native/Libraries/Lists/VirtualizedList'; +import type {ListRenderItemInfo} from 'react-native'; import * as React from 'react'; import {FlatList, StyleSheet, Text, View} from 'react-native'; diff --git a/packages/@react-native/tester/js/examples/Image/ImageExample.js b/packages/@react-native/tester/js/examples/Image/ImageExample.js index 57d687a6b02..4a4b01294be 100644 --- a/packages/@react-native/tester/js/examples/Image/ImageExample.js +++ b/packages/@react-native/tester/js/examples/Image/ImageExample.js @@ -11,15 +11,13 @@ 'use strict'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; -import type {ImageProps} from 'react-native/Libraries/Image/ImageProps'; -import type {LayoutChangeEvent} from 'react-native/Libraries/Types/CoreEventTypes'; +import type {ImageProps, LayoutChangeEvent} from 'react-native'; import RNTesterButton from '../../components/RNTesterButton'; import RNTesterText from '../../components/RNTesterText'; import ImageCapInsetsExample from './ImageCapInsetsExample'; import React from 'react'; import {Image, ImageBackground, StyleSheet, Text, View} from 'react-native'; -import * as ReactNativeFeatureFlags from 'react-native/src/private/featureflags/ReactNativeFeatureFlags'; const IMAGE1 = 'https://www.facebook.com/assets/fb_lite_messaging/E2EE-settings@3x.png'; diff --git a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverBenchmark.js b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverBenchmark.js deleted file mode 100644 index 3ab6a87d84d..00000000000 --- a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverBenchmark.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -import type IntersectionObserverType from 'react-native/src/private/webapis/intersectionobserver/IntersectionObserver'; - -import {RNTesterThemeContext} from '../../components/RNTesterTheme'; -import * as React from 'react'; -import { - type ElementRef, - useContext, - useLayoutEffect, - useRef, - useState, -} from 'react'; -import {Button, ScrollView, StyleSheet, Text, View} from 'react-native'; - -declare var IntersectionObserver: Class; - -export const name = 'IntersectionObserver Benchmark'; -export const title = name; -export const description = - 'Example of using IntersectionObserver to observe a large amount of UI elements'; - -export function render(): React.Node { - return ; -} - -const ROWS = 100; -const COLUMNS = 5; - -function IntersectionObserverBenchark(): React.Node { - const [isObserving, setObserving] = useState(false); - - return ( - <> - -