-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathindex.ios.js
33 lines (28 loc) · 948 Bytes
/
index.ios.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
import reducer from './app/reducers'
import axios from 'axios'
import { Provider } from 'react-redux'
import createLogger from 'redux-logger'
import React, { Component } from 'react'
import thunkMiddleware from 'redux-thunk'
import { AppRegistry, AsyncStorage } from 'react-native'
import AppContainer from './app/containers/AppContainer'
import setAuthorizationToken from './app/lib/setAuthorizationToken'
import { createStore, applyMiddleware, combineReducers, compose} from 'redux'
const loggerMiddleware = createLogger()
function configureStore(initialState) {
const enhancer = compose(
applyMiddleware(
thunkMiddleware,
loggerMiddleware
),
)
return createStore(reducer, initialState, enhancer)
}
const store = configureStore({})
axios.defaults.baseURL = 'http://localhost:5000'
const App = () => (
<Provider store={store}>
<AppContainer />
</Provider>
)
AppRegistry.registerComponent('YCool', () => App)