Skip to content

Instantly share code, notes, and snippets.

@FranciscoMSM
Created May 22, 2017 14:55
Show Gist options
  • Select an option

  • Save FranciscoMSM/05270184c9fbe0ee9cc815ae2acb34ea to your computer and use it in GitHub Desktop.

Select an option

Save FranciscoMSM/05270184c9fbe0ee9cc815ae2acb34ea to your computer and use it in GitHub Desktop.
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