Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d775c5ac7 | ||
|
|
dda75c0514 | ||
|
|
9eba4e6e48 | ||
|
|
e31c51d8c5 | ||
|
|
e75a4da89d |
No files matched your search
@@ -26,7 +26,7 @@
|
|||||||
## :arrow_forward: Usage
|
## :arrow_forward: Usage
|
||||||
|
|
||||||
### Note on the legacy CLI
|
### Note on the legacy CLI
|
||||||
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`), for the above command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
|
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`), for the below command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
|
||||||
|
|
||||||
Further information can be found here: https://github.com/react-native-community/cli#about
|
Further information can be found here: https://github.com/react-native-community/cli#about
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -26,8 +26,9 @@ import {
|
|||||||
ReloadInstructions,
|
ReloadInstructions,
|
||||||
} from 'react-native/Libraries/NewAppScreen';
|
} from 'react-native/Libraries/NewAppScreen';
|
||||||
|
|
||||||
|
declare var global: {HermesInternal: null | {}};
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
const usingHermes = typeof HermesInternal === 'object' && HermesInternal !== null;
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StatusBar barStyle="dark-content" />
|
<StatusBar barStyle="dark-content" />
|
||||||
@@ -36,7 +37,7 @@ const App = () => {
|
|||||||
contentInsetAdjustmentBehavior="automatic"
|
contentInsetAdjustmentBehavior="automatic"
|
||||||
style={styles.scrollView}>
|
style={styles.scrollView}>
|
||||||
<Header />
|
<Header />
|
||||||
{!usingHermes ? null : (
|
{global.HermesInternal == null ? null : (
|
||||||
<View style={styles.engine}>
|
<View style={styles.engine}>
|
||||||
<Text style={styles.footer}>Engine: Hermes</Text>
|
<Text style={styles.footer}>Engine: Hermes</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -45,8 +46,8 @@ const App = () => {
|
|||||||
<View style={styles.sectionContainer}>
|
<View style={styles.sectionContainer}>
|
||||||
<Text style={styles.sectionTitle}>Step One</Text>
|
<Text style={styles.sectionTitle}>Step One</Text>
|
||||||
<Text style={styles.sectionDescription}>
|
<Text style={styles.sectionDescription}>
|
||||||
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
|
Edit <Text style={styles.highlight}>App.tsx</Text> to change
|
||||||
screen and then come back to see your edits.
|
this screen and then come back to see your edits.
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.sectionContainer}>
|
<View style={styles.sectionContainer}>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: '@react-native-community',
|
extends: '@react-native-community',
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
plugins: ['@typescript-eslint'],
|
||||||
};
|
};
|
||||||
@@ -6,7 +6,8 @@
|
|||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
"ios": "react-native run-ios",
|
"ios": "react-native run-ios",
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"test": "jest"
|
"test": "jest",
|
||||||
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "16.9.0",
|
"react": "16.9.0",
|
||||||
@@ -15,11 +16,14 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.6.2",
|
"@babel/core": "^7.6.2",
|
||||||
"@babel/runtime": "^7.6.2",
|
"@babel/runtime": "^7.6.2",
|
||||||
"@react-native-community/eslint-config": "^0.0.5",
|
"@react-native-community/eslint-config": "^0.0.7",
|
||||||
"@types/jest": "^24.0.18",
|
"@types/jest": "^24.0.24",
|
||||||
"@types/react-native": "^0.60.22",
|
"@types/react-native": "^0.61.15",
|
||||||
"@types/react-test-renderer": "16.9.0",
|
"@types/react-test-renderer": "16.9.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^2.12.0",
|
||||||
|
"@typescript-eslint/parser": "^2.12.0",
|
||||||
"babel-jest": "^24.9.0",
|
"babel-jest": "^24.9.0",
|
||||||
|
"eslint": "^6.5.1",
|
||||||
"jest": "^24.9.0",
|
"jest": "^24.9.0",
|
||||||
"metro-react-native-babel-preset": "^0.56.0",
|
"metro-react-native-babel-preset": "^0.56.0",
|
||||||
"react-test-renderer": "16.9.0",
|
"react-test-renderer": "16.9.0",
|
||||||
|
|||||||
Reference in new issue
Block a user