forked from carloscacho/zapzap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
40 lines (33 loc) · 1.04 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
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import firebase from 'firebase';
//Redux modules
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxThunk from 'redux-thunk';
//import Files
import Routes from './src/components/Routes';
import reducers from './src/reducers';
//import config firebase
import config from './src/firebase/config';
export default class Zapzap extends Component {
//inicia o Firebase com as configurações copiadas do site
//O arquivo config.js não está sendo carregado no github
componentWillMount() {
firebase.initializeApp(config);
}
//Render Simples dos elementos do app.js
render() {
return (
//Somente cria a Store e utiliza o reduxThunk como middleware do redux
<Provider store={createStore(reducers, {}, applyMiddleware(ReduxThunk))}>
{/* chama o Routes onde estão todos os componentes */}
<Routes />
</Provider>
);
}
}