-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (26 loc) · 820 Bytes
/
index.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
import React from 'react';
import { AppRegistry } from 'react-native';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import { persistStore, persistReducer } from 'redux-persist';
import storage from 'redux-persist/es/storage';
import { PersistGate } from 'redux-persist/es/integration/react';
import reducers from './reducers';
import App from './App';
const persistConfig = {
key: 'root',
storage,
blacklist: ['scene'],
debug: true
};
const reducer = persistReducer(persistConfig, reducers);
const store = createStore(reducer);
const persistor = persistStore(store);
const Component = () => (
<Provider store={store}>
<PersistGate persistor={persistor}>
<App />
</PersistGate>
</Provider>
);
AppRegistry.registerComponent('BSMedalMarker', () => Component);