Last active
August 10, 2018 15:46
-
-
Save sagiavinash/41602770dc99ba5a6488cbece8bd55a7 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
// AppContainer.js | |
import {withRefreshedStore} from 'react-store-manager'; | |
const HomeRoute = Loadable({ | |
loader: withRefreshedStore(import('./HomePageContainer')), | |
loading: () => <div>Loading...</div> | |
}); | |
const ProductListRoute = Loadable({ | |
loader: withRefreshedStore(import('./ProductListPageContainer')), | |
loading: () => <div>Loading...</div> | |
}); | |
function AppContainer({login}) { | |
return ( | |
<App login={login}> | |
<Switch> | |
<Route exact path="/" component={HomeRoute} /> | |
<Route exact path="/products" component={ProductListRoute} /> | |
</Switch> | |
</App> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment