Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76c70cf207 | ||
|
|
d727d3c7e6 | ||
|
|
eae5bed476 | ||
|
|
94c175664a |
No files matched your search
@@ -3,7 +3,7 @@
|
|||||||
* https://github.com/facebook/react-native
|
* https://github.com/facebook/react-native
|
||||||
*
|
*
|
||||||
* Generated with the TypeScript template
|
* Generated with the TypeScript template
|
||||||
* https://github.com/emin93/react-native-template-typescript
|
* https://github.com/react-native-community/react-native-template-typescript
|
||||||
*
|
*
|
||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
@@ -27,6 +27,8 @@ import {
|
|||||||
} from 'react-native/Libraries/NewAppScreen';
|
} from 'react-native/Libraries/NewAppScreen';
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
|
const usingHermes = typeof HermesInternal === 'object' && HermesInternal !== null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<StatusBar barStyle="dark-content" />
|
<StatusBar barStyle="dark-content" />
|
||||||
@@ -35,7 +37,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>
|
||||||
|
|||||||
@@ -25,6 +25,14 @@
|
|||||||
|
|
||||||
## :arrow_forward: Usage
|
## :arrow_forward: Usage
|
||||||
|
|
||||||
|
### React Native >= 0.60
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx react-native init MyApp --template react-native-template-typescript@next
|
||||||
|
```
|
||||||
|
|
||||||
|
### React Native <= 0.59
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
react-native init MyApp --template typescript
|
react-native init MyApp --template typescript
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in new issue
Block a user