-
Notifications
You must be signed in to change notification settings - Fork 432
/
index.js
18 lines (17 loc) · 655 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { registerRootComponent } from 'expo';
import * as React from 'react';
import { Platform, View, Text } from 'react-native';
if (Platform.OS !== 'web') {
const App = require('./native/App').default;
registerRootComponent(App);
} else {
// In case someone accidentally opens web via expo-cli
registerRootComponent(() => (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>
Use <Text style={{ fontWeight: 'bold' }}>yarn start</Text> to start up Next.js rather than
loading it through expo-cli. Use expo-cli to open the directory iOS and Android apps.
</Text>
</View>
));
}