Skip to content

Commit eae5bed

Browse files
authored
Merge pull request #55 from react-native-community/orta-patch-1
Update App.tsx to correspond to def typed updates
2 parents 98c6517 + 94c1756 commit eae5bed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

App.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* https://github.com/facebook/react-native
44
*
55
* Generated with the TypeScript template
6-
* https://github.com/emin93/react-native-template-typescript
6+
* https://github.com/react-native-community/react-native-template-typescript
77
*
88
* @format
99
*/
@@ -27,6 +27,8 @@ import {
2727
} from 'react-native/Libraries/NewAppScreen';
2828

2929
const App = () => {
30+
const usingHermes = typeof HermesInternal === 'object' && HermesInternal !== null;
31+
3032
return (
3133
<Fragment>
3234
<StatusBar barStyle="dark-content" />
@@ -35,7 +37,7 @@ const App = () => {
3537
contentInsetAdjustmentBehavior="automatic"
3638
style={styles.scrollView}>
3739
<Header />
38-
{global.HermesInternal == null ? null : (
40+
{!usingHermes ? null : (
3941
<View style={styles.engine}>
4042
<Text style={styles.footer}>Engine: Hermes</Text>
4143
</View>
@@ -113,4 +115,4 @@ const styles = StyleSheet.create({
113115
},
114116
});
115117

116-
export default App;
118+
export default App;

0 commit comments

Comments
 (0)