-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
34 lines (29 loc) · 945 Bytes
/
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
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import firebase from 'firebase';
import ReduxThunk from 'redux-thunk';
import reducers from './src/reducers';
import Router from './src/Router';
class App extends Component {
componentWillMount() {
const config = {
apiKey: "AIzaSyAHV2zu5dn1BCQf11hciBqzbv9w3HV_a40",
authDomain: "first-react-native-4ab37.firebaseapp.com",
databaseURL: "https://first-react-native-4ab37.firebaseio.com",
projectId: "first-react-native-4ab37",
storageBucket: "first-react-native-4ab37.appspot.com",
messagingSenderId: "415318520177"
};
firebase.initializeApp(config);
}
render() {
const store = createStore(reducers, {}, applyMiddleware(ReduxThunk));
return (
<Provider store={store}>
<Router />
</Provider>
);
}
}
export default App;