forked from rohitjain-dev/food-delivery-app-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
55 lines (45 loc) · 1.23 KB
/
App.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//import liraries
import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import {Provider as PaperProvider} from 'react-native-paper';
import {Provider as StoreProvider} from 'react-redux' ;
import firebase from 'firebase';
import reducers from './src/reducers';
import AppNavigator from './src/routing/AppNavigator';
import {createStore,applyMiddleware} from "redux";
import ReduxThunk from 'redux-thunk';
//screen imports
// create a component
class App extends Component {
componentWillMount(): void {
var config = {
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: ""
};
firebase.initializeApp(config);
}
render() {
const store = createStore(reducers,{},applyMiddleware(ReduxThunk));
return (
<StoreProvider store={store}>
<PaperProvider>
<View style={style.container}>
<AppNavigator></AppNavigator>
</View>
</PaperProvider>
</StoreProvider>
);
}
}
const style = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#ffffff',
}
})
//make this component available to the app
export default App;