generated from rocketseat-education/myshopping-rn-ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
27 lines (21 loc) · 751 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import 'react-native-gesture-handler';
import '@react-native-firebase/app';
import firestore from '@react-native-firebase/firestore';
import { registerRootComponent } from 'expo';
import App from './App';
if(__DEV__){
firestore().terminate().then(() => {
firestore().clearPersistence().then(() => {
firestore().useEmulator('localhost', 8080);
}).catch(() => {
console.log('Error clearing persistence');
});
}).catch(() => {
console.log('Error terminating');
});
}
firestore();
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);