-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
72 lines (59 loc) · 1.92 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import React, { useEffect } from "react";
import { StyleSheet, Text, View } from "react-native";
import firebaseConfig from "./config";
import firebase from 'firebase';
import NAVIGATION from "./navigation/NAVIGATION";
import { createStore, combineReducers, applyMiddleware } from "redux";
import { Provider } from "react-redux";
import ReduxThunk from "redux-thunk";
import authReducer from "./store/reducers/auth-reducer";
import feedReducer from "./store/reducers/feed";
export default function App() {
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}else{
firebase.app();
}
const rootReducer = combineReducers({
auth: authReducer,
feed: feedReducer,
});
console.disableYellowBox = true;
const store = createStore(rootReducer, applyMiddleware(ReduxThunk));
return (
<Provider store={store}>
<NAVIGATION />
</Provider>
);
}
// import { createStore, combineReducers, applyMiddleware } from "redux";
// import { Provider } from "react-redux";
// import createSagaMiddleware from "redux-saga";
// import authReducer from "./STORE-01/REDUCER/authReducer";
// import rootSaga from "./STORE-01/SAGA/ROOTSAGA/rootSaga";
// // import feedReducer from "./store/reducers/feed";
// export default function App() {
// useEffect(() => {
// firebase.initializeApp(firebaseConfig);
// return () => {};
// }, []);
// const reducers = combineReducers({
// auth: authReducer,
// });
// const sagaMiddleware = createSagaMiddleware();
// const store = createStore(reducers, applyMiddleware(sagaMiddleware));
// sagaMiddleware.run(rootSaga);
// return (
// <Provider store={store}>
// <NAVIGATION />
// </Provider>
// );
// }
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});