Created
May 22, 2017 14:55
-
-
Save FranciscoMSM/05270184c9fbe0ee9cc815ae2acb34ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { Provider } from 'react-redux'; | |
| import Spinner from './components/loaders/Spinner'; | |
| import DrawerNavigation from './router/DrawerNavigation'; | |
| import configureStore from './configureStore'; | |
| function setup():React.Component { | |
| class Root extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.store = configureStore(); | |
| } | |
| render() { | |
| const { store } = this; | |
| return !store | |
| ? <Spinner /> | |
| : <Provider store={this.store}> | |
| <DrawerNavigation /> | |
| </Provider> | |
| ; | |
| } | |
| } | |
| return Root; | |
| } | |
| export default setup; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment