Skip to content

Instantly share code, notes, and snippets.

@thedevdavid
Created February 26, 2018 10:40
Show Gist options
  • Save thedevdavid/4d470d712f77cbf93eb8f577c7e16a7a to your computer and use it in GitHub Desktop.
Save thedevdavid/4d470d712f77cbf93eb8f577c7e16a7a to your computer and use it in GitHub Desktop.
index.js
import React from 'react';
import { AppRegistry, Text } from 'react-native';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
import configureStore from './src/config/store';
import App from './App';
const { store, persistor } = configureStore();
const ConnectedApp = () => (
<Provider store={store}>
<PersistGate loading={<Text>Loading...</Text>} persistor={persistor}>
<App />
</PersistGate>
</Provider>
);
AppRegistry.registerComponent('fakestagram', () => ConnectedApp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment