Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e79a558d9d | ||
|
|
66b6b39976 | ||
|
|
7ddce71e49 | ||
|
|
da00aff48c | ||
|
|
f65950c30b | ||
|
|
93f8d1fdd1 |
No files matched your search
@@ -25,12 +25,18 @@
|
|||||||
|
|
||||||
## :arrow_forward: Usage
|
## :arrow_forward: Usage
|
||||||
|
|
||||||
> `react-native@0.60` or higher
|
> `react-native@0.61.0` or higher
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npx react-native init MyApp --template react-native-template-typescript
|
npx react-native init MyApp --template react-native-template-typescript
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> `react-native@0.60.x`
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx react-native init MyApp --template react-native-template-typescript@6.2.0
|
||||||
|
```
|
||||||
|
|
||||||
### 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 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`).
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -27,6 +27,7 @@ import {
|
|||||||
} from 'react-native/Libraries/NewAppScreen';
|
} from 'react-native/Libraries/NewAppScreen';
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
|
const usingHermes = typeof HermesInternal === 'object' && HermesInternal !== null;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StatusBar barStyle="dark-content" />
|
<StatusBar barStyle="dark-content" />
|
||||||
@@ -35,7 +36,7 @@ const App = () => {
|
|||||||
contentInsetAdjustmentBehavior="automatic"
|
contentInsetAdjustmentBehavior="automatic"
|
||||||
style={styles.scrollView}>
|
style={styles.scrollView}>
|
||||||
<Header />
|
<Header />
|
||||||
{global.HermesInternal == null ? null : (
|
{!usingHermes ? 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>
|
||||||
|
|||||||
Reference in new issue
Block a user