-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathApp.js
26 lines (23 loc) · 790 Bytes
/
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
import React, { Component } from 'react';
import { Provider, connect } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { createReduxContainer } from 'react-navigation-redux-helpers';
import RootNavigation from './src/navigations/RootNavigation';
import { store, persistor } from './src/redux/store';
const AppNav = createReduxContainer(RootNavigation, 'root');
const mapStateToProps = state => ({
state: state.router
});
const AppWithNavigationState = connect(mapStateToProps)(AppNav);
class App extends Component {
render() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<AppWithNavigationState />
</PersistGate>
</Provider>
);
}
}
export default App;