Compare commits

..
4 Commits
Author SHA1 Message Date
Mateus Andrade 76c70cf207 Merge pull request #59 from react-native-community/fix/default-readme
Fix suggested usage for RN >= 0.60
2019-09-10 10:02:44 -03:00
Radek Czemerys d727d3c7e6 Fix suggested usage for RN >= 0.60 2019-09-10 11:18:53 +02:00
Emin Khateeb eae5bed476 Merge pull request #55 from react-native-community/orta-patch-1
Update App.tsx to correspond to def typed updates
2019-08-12 14:18:15 +02:00
Orta 94c175664a Update App.tsx 2019-08-01 16:04:53 -04:00
2 changed files with 12 additions and 2 deletions

No files matched your search

+4 -2
View File
@@ -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>
+8
View File
@@ -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
``` ```