@react-native-community/template 0.78.0-nightly-2025114-90f2bf3 → 0.78.0-rc.0-222da7e
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.
- package/package.json +2 -2
- package/template/App.tsx +18 -5
- package/template/android/build.gradle +1 -1
- package/template/package.json +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-community/template",
|
|
3
|
-
"version": "0.78.0-
|
|
3
|
+
"version": "0.78.0-rc.0-222da7e",
|
|
4
4
|
"description": "The template used by `npx @react-native-community/cli init` to bootstrap a React Native application.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "jest",
|
|
11
|
-
"version": "
|
|
11
|
+
"version": "0.78.0-rc.0"
|
|
12
12
|
},
|
|
13
13
|
"type": "commonjs",
|
|
14
14
|
"files": [
|
package/template/App.tsx
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import type {PropsWithChildren} from 'react';
|
|
10
10
|
import {
|
|
11
|
-
SafeAreaView,
|
|
12
11
|
ScrollView,
|
|
13
12
|
StatusBar,
|
|
14
13
|
StyleSheet,
|
|
@@ -62,19 +61,33 @@ function App(): React.JSX.Element {
|
|
|
62
61
|
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
|
|
63
62
|
};
|
|
64
63
|
|
|
64
|
+
/*
|
|
65
|
+
* To keep the template simple and small we're adding padding to prevent view
|
|
66
|
+
* from rendering under the System UI.
|
|
67
|
+
* For bigger apps the reccomendation is to use `react-native-safe-area-context`:
|
|
68
|
+
* https://github.com/AppAndFlow/react-native-safe-area-context
|
|
69
|
+
*
|
|
70
|
+
* You can read more about it here:
|
|
71
|
+
* https://github.com/react-native-community/discussions-and-proposals/discussions/827
|
|
72
|
+
*/
|
|
73
|
+
const safePadding = '5%';
|
|
74
|
+
|
|
65
75
|
return (
|
|
66
|
-
<
|
|
76
|
+
<View style={backgroundStyle}>
|
|
67
77
|
<StatusBar
|
|
68
78
|
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
|
69
79
|
backgroundColor={backgroundStyle.backgroundColor}
|
|
70
80
|
/>
|
|
71
81
|
<ScrollView
|
|
72
|
-
contentInsetAdjustmentBehavior="automatic"
|
|
73
82
|
style={backgroundStyle}>
|
|
74
|
-
<
|
|
83
|
+
<View style={{paddingRight: safePadding}}>
|
|
84
|
+
<Header/>
|
|
85
|
+
</View>
|
|
75
86
|
<View
|
|
76
87
|
style={{
|
|
77
88
|
backgroundColor: isDarkMode ? Colors.black : Colors.white,
|
|
89
|
+
paddingHorizontal: safePadding,
|
|
90
|
+
paddingBottom: safePadding,
|
|
78
91
|
}}>
|
|
79
92
|
<Section title="Step One">
|
|
80
93
|
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
|
|
@@ -92,7 +105,7 @@ function App(): React.JSX.Element {
|
|
|
92
105
|
<LearnMoreLinks />
|
|
93
106
|
</View>
|
|
94
107
|
</ScrollView>
|
|
95
|
-
</
|
|
108
|
+
</View>
|
|
96
109
|
);
|
|
97
110
|
}
|
|
98
111
|
|
package/template/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "19.0.0",
|
|
14
|
-
"react-native": "
|
|
14
|
+
"react-native": "0.78.0-rc.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@babel/core": "^7.25.2",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"@react-native-community/cli": "15.0.1",
|
|
21
21
|
"@react-native-community/cli-platform-android": "15.0.1",
|
|
22
22
|
"@react-native-community/cli-platform-ios": "15.0.1",
|
|
23
|
-
"@react-native/babel-preset": "
|
|
24
|
-
"@react-native/eslint-config": "
|
|
25
|
-
"@react-native/metro-config": "
|
|
26
|
-
"@react-native/typescript-config": "
|
|
23
|
+
"@react-native/babel-preset": "0.78.0-rc.0",
|
|
24
|
+
"@react-native/eslint-config": "0.78.0-rc.0",
|
|
25
|
+
"@react-native/metro-config": "0.78.0-rc.0",
|
|
26
|
+
"@react-native/typescript-config": "0.78.0-rc.0",
|
|
27
27
|
"@types/jest": "^29.5.13",
|
|
28
28
|
"@types/react": "^19.0.0",
|
|
29
29
|
"@types/react-test-renderer": "^19.0.0",
|