-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
39 lines (34 loc) · 1.06 KB
/
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
32
33
34
35
36
37
38
39
import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import { RealmProvider } from 'react-native-realm';
import { Navigation } from 'react-native-navigation';
import { ImageCacheProvider } from 'react-native-cached-image';
import { registerScreens } from './app/screens';
import configureStore from './app/store';
import App from './app/App';
import realm from './data';
class MyProvider extends React.Component {
static propTypes = {
store: PropTypes.object.isRequired,
children: PropTypes.node.isRequired,
};
render() {
return (
<ImageCacheProvider>
<RealmProvider realm={realm}>
<Provider store={this.props.store}>
{ this.props.children }
</Provider>
</RealmProvider>
</ImageCacheProvider>
);
}
}
const { store /* , persistor */ } = configureStore({});
registerScreens(MyProvider, store);
/* eslint-disable @typescript-eslint/no-unused-vars */
let app = null;
Navigation.events().registerAppLaunchedListener(() => {
app = new App(store);
});