-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
25 lines (21 loc) · 688 Bytes
/
Copy pathApp.js
File metadata and controls
25 lines (21 loc) · 688 Bytes
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
import React from 'react'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import thunkMiddleware from 'redux-thunk'
import AppNavigator from './AppNavigator'
import rootReducer from './reducers/index'
import {decode, encode} from 'base-64'
if (!global.btoa) { global.btoa = encode }
if (!global.atob) { global.atob = decode }
const middleware = applyMiddleware(thunkMiddleware)
const store = createStore(rootReducer, middleware)
export default class App extends React.Component {
render() {
console.log(store.getState())
return(
<Provider store = {store}>
<AppNavigator/>
</Provider>
);
}
}