@office-iss/react-native-win32 0.0.0-canary.292 → 0.0.0-canary.294

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/.flowconfig +8 -1
  2. package/CHANGELOG.json +58 -1
  3. package/CHANGELOG.md +22 -4
  4. package/IntegrationTests/ImageCachePolicyTest.js +1 -1
  5. package/IntegrationTests/LayoutEventsTest.js +1 -4
  6. package/Libraries/Animated/AnimatedExports.js.flow +126 -0
  7. package/Libraries/Animated/AnimatedImplementation.js +0 -121
  8. package/Libraries/Animated/animations/Animation.js +8 -4
  9. package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
  10. package/Libraries/Animated/nodes/AnimatedValue.js +8 -4
  11. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  12. package/Libraries/Blob/BlobManager.js +1 -0
  13. package/Libraries/Blob/URL.js +13 -1
  14. package/Libraries/Components/Pressable/Pressable.js +4 -1
  15. package/Libraries/Components/Pressable/Pressable.win32.js +4 -1
  16. package/Libraries/Components/ScrollView/ScrollView.d.ts +2 -2
  17. package/Libraries/Components/ScrollView/ScrollView.js +1 -0
  18. package/Libraries/Components/Switch/Switch.js +7 -3
  19. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -0
  20. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  21. package/Libraries/Components/TextInput/TextInput.flow.js +25 -0
  22. package/Libraries/Components/TextInput/TextInput.flow.win32.js +25 -1
  23. package/Libraries/Components/TextInput/TextInput.js +3 -0
  24. package/Libraries/Components/TextInput/TextInput.win32.js +2 -0
  25. package/Libraries/Components/View/View.js +18 -21
  26. package/Libraries/Components/View/View.win32.js +21 -24
  27. package/Libraries/Components/View/ViewAccessibility.js +16 -0
  28. package/Libraries/Core/ReactNativeVersion.js +1 -1
  29. package/Libraries/Core/setUpReactDevTools.js +5 -5
  30. package/Libraries/Image/ImageProps.js +2 -3
  31. package/Libraries/Image/ImageSource.js +3 -1
  32. package/Libraries/Image/ImageSourceUtils.js +4 -2
  33. package/Libraries/Lists/FlatList.d.ts +2 -2
  34. package/Libraries/Lists/SectionListModern.js +1 -2
  35. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  36. package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
  37. package/Libraries/NativeComponent/BaseViewConfig.ios.js +1 -0
  38. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  39. package/Libraries/ReactNative/AppContainer-dev.js +3 -2
  40. package/Libraries/ReactNative/FabricUIManager.js +10 -0
  41. package/Libraries/ReactNative/RendererImplementation.js +6 -5
  42. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
  43. package/Libraries/ReactNative/renderApplication.js +9 -0
  44. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -0
  45. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  46. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  47. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  48. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  49. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  50. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  51. package/Libraries/Settings/Settings.ios.js +1 -0
  52. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  53. package/Libraries/StyleSheet/StyleSheetTypes.js +47 -3
  54. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  55. package/Libraries/Text/TextNativeComponent.js +0 -4
  56. package/Libraries/Text/TextNativeComponent.win32.js +0 -4
  57. package/index.js +1 -288
  58. package/index.win32.js +3 -292
  59. package/overrides.json +14 -14
  60. package/package.json +20 -20
  61. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  62. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +2 -2
  63. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +5 -4
  64. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +7 -5
  65. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +10 -9
  66. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +13 -11
  67. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +4 -3
  68. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +8 -7
  69. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +9 -8
  70. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  71. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +6 -5
  72. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  73. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
  74. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  75. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +5 -4
  76. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  77. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  78. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  79. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
  80. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  81. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  82. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  83. package/src/private/featureflags/ReactNativeFeatureFlags.js +48 -18
  84. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +11 -5
  85. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  86. package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
  87. package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
  88. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  89. package/src/private/types/HostInstance.js +2 -2
  90. package/src/private/webapis/performance/PerformanceEntry.js +6 -1
  91. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
  92. package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
  93. package/types/index.d.ts +1 -2
  94. package/types/public/ReactNativeTypes.d.ts +2 -2
  95. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  96. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  97. package/Libraries/Blob/__mocks__/BlobModule.js +0 -16
  98. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  99. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  100. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  101. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  102. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  103. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  104. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  105. package/Libraries/NewAppScreen/components/Colors.js +0 -19
  106. package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -39
  107. package/Libraries/NewAppScreen/components/Header.js +0 -75
  108. package/Libraries/NewAppScreen/components/HermesBadge.js +0 -51
  109. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -146
  110. package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -37
  111. package/Libraries/NewAppScreen/components/logo.png +0 -0
  112. package/Libraries/NewAppScreen/index.js +0 -25
  113. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  114. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  115. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
  116. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  117. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  118. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  119. package/jest/__tests__/setup-test.js +0 -18
  120. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  121. package/types/modules/LaunchScreen.d.ts +0 -26
  122. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  123. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
@@ -1,118 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- 'use strict';
12
-
13
- const FlatList = require('../FlatList').default;
14
- const React = require('react');
15
-
16
- function renderMyListItem(info: {
17
- item: {title: string, ...},
18
- index: number,
19
- ...
20
- }) {
21
- return <span />;
22
- }
23
-
24
- module.exports = {
25
- testEverythingIsFine(): React.Node {
26
- const data = [
27
- {
28
- title: 'Title Text',
29
- key: 1,
30
- },
31
- ];
32
- return <FlatList renderItem={renderMyListItem} data={data} />;
33
- },
34
-
35
- testBadDataWithTypicalItem(): React.Node {
36
- const data = [
37
- {
38
- title: 6,
39
- key: 1,
40
- },
41
- ];
42
- // $FlowExpectedError - bad title type 6, should be string
43
- return <FlatList renderItem={renderMyListItem} data={data} />;
44
- },
45
-
46
- testMissingFieldWithTypicalItem(): React.Node {
47
- const data = [
48
- {
49
- key: 1,
50
- },
51
- ];
52
- // $FlowExpectedError - missing title
53
- return <FlatList renderItem={renderMyListItem} data={data} />;
54
- },
55
-
56
- testGoodDataWithBadCustomRenderItemFunction(): React.Node {
57
- const data = [
58
- {
59
- widget: 6,
60
- key: 1,
61
- },
62
- ];
63
- return (
64
- <FlatList
65
- renderItem={info => (
66
- <span>
67
- {
68
- // $FlowExpectedError - bad widgetCount type 6, should be Object
69
- info.item.widget.missingProp
70
- }
71
- </span>
72
- )}
73
- data={data}
74
- />
75
- );
76
- },
77
-
78
- testBadRenderItemFunction(): $ReadOnlyArray<React.Node> {
79
- const data = [
80
- {
81
- title: 'foo',
82
- key: 1,
83
- },
84
- ];
85
- return [
86
- // $FlowExpectedError - title should be inside `item`
87
- <FlatList renderItem={(info: {title: string}) => <span />} data={data} />,
88
- <FlatList
89
- // $FlowExpectedError - bad index type string, should be number
90
- renderItem={(info: {item: any, index: string}) => <span />}
91
- data={data}
92
- />,
93
- <FlatList
94
- // $FlowExpectedError - bad title type number, should be string
95
- renderItem={(info: {item: {title: number}}) => <span />}
96
- // $FlowExpectedError - bad title type number, should be string
97
- data={data}
98
- />,
99
- // EverythingIsFine
100
- <FlatList
101
- // $FlowExpectedError - bad title type number, should be string
102
- renderItem={(info: {item: {title: string, ...}, ...}) => <span />}
103
- data={data}
104
- />,
105
- ];
106
- },
107
-
108
- testOtherBadProps(): $ReadOnlyArray<React.Node> {
109
- return [
110
- // $FlowExpectedError - bad numColumns type "lots"
111
- <FlatList renderItem={renderMyListItem} data={[]} numColumns="lots" />,
112
- // $FlowExpectedError - bad windowSize type "big"
113
- <FlatList renderItem={renderMyListItem} data={[]} windowSize="big" />,
114
- // $FlowExpectedError - missing `data` prop
115
- <FlatList renderItem={renderMyListItem} />,
116
- ];
117
- },
118
- };
@@ -1,134 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- * @format
9
- */
10
-
11
- 'use strict';
12
-
13
- import SectionList from '../SectionList';
14
- import * as React from 'react';
15
-
16
- function renderMyListItem(info: {
17
- item: {title: string, ...},
18
- index: number,
19
- ...
20
- }) {
21
- return <span />;
22
- }
23
-
24
- const renderMyHeader = ({
25
- section,
26
- }: {
27
- section: {fooNumber: number, ...} & Object,
28
- ...
29
- }) => <span />;
30
-
31
- module.exports = {
32
- testGoodDataWithGoodItem(): React.Node {
33
- const sections = [
34
- {
35
- key: 'a',
36
- data: [
37
- {
38
- title: 'foo',
39
- key: 1,
40
- },
41
- ],
42
- },
43
- ];
44
- return <SectionList renderItem={renderMyListItem} sections={sections} />;
45
- },
46
-
47
- testBadRenderItemFunction(): $ReadOnlyArray<React.Node> {
48
- const sections = [
49
- {
50
- key: 'a',
51
- data: [
52
- {
53
- title: 'foo',
54
- key: 1,
55
- },
56
- ],
57
- },
58
- ];
59
- return [
60
- <SectionList
61
- // $FlowExpectedError - title should be inside `item`
62
- renderItem={(info: {title: string, ...}) => <span />}
63
- sections={sections}
64
- />,
65
- <SectionList
66
- // $FlowExpectedError - bad index type string, should be number
67
- renderItem={(info: {index: string}) => <span />}
68
- sections={sections}
69
- />,
70
- // EverythingIsFine
71
- <SectionList
72
- renderItem={(info: {item: {title: string, ...}, ...}) => <span />}
73
- sections={sections}
74
- />,
75
- ];
76
- },
77
-
78
- testBadInheritedDefaultProp(): React.MixedElement {
79
- const sections: $FlowFixMe = [];
80
- return (
81
- <SectionList
82
- renderItem={renderMyListItem}
83
- sections={sections}
84
- // $FlowExpectedError - bad windowSize type "big"
85
- windowSize="big"
86
- />
87
- );
88
- },
89
-
90
- testMissingData(): React.MixedElement {
91
- // $FlowExpectedError - missing `sections` prop
92
- return <SectionList renderItem={renderMyListItem} />;
93
- },
94
-
95
- testBadSectionsShape(): React.MixedElement {
96
- const sections = [
97
- {
98
- key: 'a',
99
- items: [
100
- {
101
- title: 'foo',
102
- key: 1,
103
- },
104
- ],
105
- },
106
- ];
107
- // $FlowExpectedError - section missing `data` field
108
- return <SectionList renderItem={renderMyListItem} sections={sections} />;
109
- },
110
-
111
- testBadSectionsMetadata(): React.MixedElement {
112
- const sections = [
113
- {
114
- key: 'a',
115
- fooNumber: 'string',
116
- data: [
117
- {
118
- title: 'foo',
119
- key: 1,
120
- },
121
- ],
122
- },
123
- ];
124
- return (
125
- <SectionList
126
- renderSectionHeader={renderMyHeader}
127
- renderItem={renderMyListItem}
128
- /* $FlowExpectedError - section has bad meta data `fooNumber` field of
129
- * type string */
130
- sections={sections}
131
- />
132
- );
133
- },
134
- };
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- export default {
12
- primary: '#1292B4',
13
- white: '#FFF',
14
- lighter: '#F3F3F3',
15
- light: '#DAE1E7',
16
- dark: '#444',
17
- darker: '#222',
18
- black: '#000',
19
- };
@@ -1,39 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- import StyleSheet from '../../StyleSheet/StyleSheet';
12
- import Text from '../../Text/Text';
13
- import Platform from '../../Utilities/Platform';
14
- import * as React from 'react';
15
-
16
- const styles = StyleSheet.create({
17
- highlight: {
18
- fontWeight: '700',
19
- },
20
- });
21
-
22
- const DebugInstructions: () => React.Node = Platform.select({
23
- ios: () => (
24
- <Text>
25
- Press <Text style={styles.highlight}>Cmd + D</Text> in the simulator or{' '}
26
- <Text style={styles.highlight}>Shake</Text> your device to open the Dev
27
- Menu.
28
- </Text>
29
- ),
30
- default: () => (
31
- <Text>
32
- Press <Text style={styles.highlight}>Cmd or Ctrl + M</Text> or{' '}
33
- <Text style={styles.highlight}>Shake</Text> your device to open the Dev
34
- Menu.
35
- </Text>
36
- ),
37
- });
38
-
39
- export default DebugInstructions;
@@ -1,75 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- import ImageBackground from '../../Image/ImageBackground';
12
- import StyleSheet from '../../StyleSheet/StyleSheet';
13
- import Text from '../../Text/Text';
14
- import useColorScheme from '../../Utilities/useColorScheme';
15
- import Colors from './Colors';
16
- import HermesBadge from './HermesBadge';
17
- import * as React from 'react';
18
-
19
- const Header = (): React.Node => {
20
- const isDarkMode = useColorScheme() === 'dark';
21
- return (
22
- <ImageBackground
23
- accessibilityRole="image"
24
- testID="new-app-screen-header"
25
- source={require('./logo.png')}
26
- style={[
27
- styles.background,
28
- {
29
- backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
30
- },
31
- ]}
32
- imageStyle={styles.logo}>
33
- <HermesBadge />
34
- <Text
35
- style={[
36
- styles.text,
37
- {
38
- color: isDarkMode ? Colors.white : Colors.black,
39
- },
40
- ]}>
41
- Welcome to
42
- {'\n'}
43
- React Native
44
- </Text>
45
- </ImageBackground>
46
- );
47
- };
48
-
49
- const styles = StyleSheet.create({
50
- background: {
51
- paddingBottom: 40,
52
- paddingTop: 96,
53
- paddingHorizontal: 32,
54
- },
55
- logo: {
56
- opacity: 0.2,
57
- overflow: 'visible',
58
- resizeMode: 'cover',
59
- /*
60
- * These negative margins allow the image to be offset similarly across screen sizes and component sizes.
61
- *
62
- * The source logo.png image is 512x512px, so as such, these margins attempt to be relative to the
63
- * source image's size.
64
- */
65
- marginLeft: -128,
66
- marginBottom: -192,
67
- },
68
- text: {
69
- fontSize: 40,
70
- fontWeight: '700',
71
- textAlign: 'center',
72
- },
73
- });
74
-
75
- export default Header;
@@ -1,51 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- import View from '../../Components/View/View';
12
- import StyleSheet from '../../StyleSheet/StyleSheet';
13
- import Text from '../../Text/Text';
14
- import useColorScheme from '../../Utilities/useColorScheme';
15
- import Colors from './Colors';
16
- import * as React from 'react';
17
-
18
- const HermesBadge = (): React.Node => {
19
- const isDarkMode = useColorScheme() === 'dark';
20
- const version =
21
- global.HermesInternal?.getRuntimeProperties?.()['OSS Release Version'] ??
22
- '';
23
- return global.HermesInternal ? (
24
- <View style={styles.badge}>
25
- <Text
26
- style={[
27
- styles.badgeText,
28
- {
29
- color: isDarkMode ? Colors.light : Colors.dark,
30
- },
31
- ]}>
32
- {`Engine: Hermes ${version}`}
33
- </Text>
34
- </View>
35
- ) : null;
36
- };
37
-
38
- const styles = StyleSheet.create({
39
- badge: {
40
- position: 'absolute',
41
- right: 12,
42
- bottom: 8,
43
- },
44
- badgeText: {
45
- fontSize: 14,
46
- fontWeight: '600',
47
- textAlign: 'right',
48
- },
49
- });
50
-
51
- export default HermesBadge;
@@ -1,146 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- import TouchableOpacity from '../../Components/Touchable/TouchableOpacity';
12
- import View from '../../Components/View/View';
13
- import openURLInBrowser from '../../Core/Devtools/openURLInBrowser';
14
- import StyleSheet from '../../StyleSheet/StyleSheet';
15
- import Text from '../../Text/Text';
16
- import useColorScheme from '../../Utilities/useColorScheme';
17
- import Colors from './Colors';
18
- import * as React from 'react';
19
-
20
- const links = [
21
- {
22
- id: 1,
23
- title: 'The Basics',
24
- link: 'https://reactnative.dev/docs/tutorial',
25
- description: 'Explains a Hello World for React Native.',
26
- },
27
- {
28
- id: 2,
29
- title: 'Style',
30
- link: 'https://reactnative.dev/docs/style',
31
- description:
32
- 'Covers how to use the prop named style which controls the visuals.',
33
- },
34
- {
35
- id: 3,
36
- title: 'Layout',
37
- link: 'https://reactnative.dev/docs/flexbox',
38
- description: 'React Native uses flexbox for layout, learn how it works.',
39
- },
40
- {
41
- id: 4,
42
- title: 'Components',
43
- link: 'https://reactnative.dev/docs/components-and-apis',
44
- description: 'The full list of components and APIs inside React Native.',
45
- },
46
- {
47
- id: 5,
48
- title: 'Navigation',
49
- link: 'https://reactnative.dev/docs/navigation',
50
- description:
51
- 'How to handle moving between screens inside your application.',
52
- },
53
- {
54
- id: 6,
55
- title: 'Networking',
56
- link: 'https://reactnative.dev/docs/network',
57
- description: 'How to use the Fetch API in React Native.',
58
- },
59
- {
60
- id: 7,
61
- title: 'Debugging',
62
- link: 'https://facebook.github.io/react-native/docs/debugging',
63
- description:
64
- 'Learn about the tools available to debug and inspect your app.',
65
- },
66
- {
67
- id: 8,
68
- title: 'Help',
69
- link: 'https://facebook.github.io/react-native/help',
70
- description:
71
- 'Need more help? There are many other React Native developers who may have the answer.',
72
- },
73
- {
74
- id: 9,
75
- title: 'Follow us',
76
- link: 'https://x.com/reactnative',
77
- description:
78
- 'Stay in touch with the community, join in on Q&As and more by following React Native on X.',
79
- },
80
- ];
81
-
82
- const LinkList = (): React.Node => {
83
- const isDarkMode = useColorScheme() === 'dark';
84
- return (
85
- <View style={styles.container}>
86
- {links.map(({id, title, link, description}) => (
87
- <React.Fragment key={id}>
88
- <View
89
- style={[
90
- styles.separator,
91
- {
92
- backgroundColor: isDarkMode ? Colors.dark : Colors.light,
93
- },
94
- ]}
95
- />
96
- <TouchableOpacity
97
- accessibilityRole="button"
98
- onPress={() => openURLInBrowser(link)}
99
- style={styles.linkContainer}>
100
- <Text style={styles.link}>{title}</Text>
101
- <Text
102
- style={[
103
- styles.description,
104
- {
105
- color: isDarkMode ? Colors.lighter : Colors.dark,
106
- },
107
- ]}>
108
- {description}
109
- </Text>
110
- </TouchableOpacity>
111
- </React.Fragment>
112
- ))}
113
- </View>
114
- );
115
- };
116
-
117
- const styles = StyleSheet.create({
118
- container: {
119
- marginTop: 32,
120
- paddingHorizontal: 24,
121
- },
122
- linkContainer: {
123
- flexWrap: 'wrap',
124
- flexDirection: 'row',
125
- justifyContent: 'space-between',
126
- alignItems: 'center',
127
- paddingVertical: 8,
128
- },
129
- link: {
130
- flex: 2,
131
- fontSize: 18,
132
- fontWeight: '400',
133
- color: Colors.primary,
134
- },
135
- description: {
136
- flex: 3,
137
- paddingVertical: 16,
138
- fontWeight: '400',
139
- fontSize: 18,
140
- },
141
- separator: {
142
- height: StyleSheet.hairlineWidth,
143
- },
144
- });
145
-
146
- export default LinkList;
@@ -1,37 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- import StyleSheet from '../../StyleSheet/StyleSheet';
12
- import Text from '../../Text/Text';
13
- import Platform from '../../Utilities/Platform';
14
- import * as React from 'react';
15
-
16
- const styles = StyleSheet.create({
17
- highlight: {
18
- fontWeight: '700',
19
- },
20
- });
21
-
22
- const ReloadInstructions: () => React.Node = Platform.select({
23
- ios: () => (
24
- <Text>
25
- Press <Text style={styles.highlight}>Cmd + R</Text> in the simulator to
26
- reload your app's code.
27
- </Text>
28
- ),
29
- default: () => (
30
- <Text>
31
- Double tap <Text style={styles.highlight}>R</Text> on your keyboard to
32
- reload your app's code.
33
- </Text>
34
- ),
35
- });
36
-
37
- export default ReloadInstructions;
@@ -1,25 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- import Colors from './components/Colors';
12
- import DebugInstructions from './components/DebugInstructions';
13
- import Header from './components/Header';
14
- import HermesBadge from './components/HermesBadge';
15
- import LearnMoreLinks from './components/LearnMoreLinks';
16
- import ReloadInstructions from './components/ReloadInstructions';
17
-
18
- export {
19
- Colors,
20
- Header,
21
- HermesBadge,
22
- LearnMoreLinks,
23
- DebugInstructions,
24
- ReloadInstructions,
25
- };