Last active
March 14, 2019 16:35
-
-
Save duanebester/6a717220df05c1b010493e2e5d4c7d3e to your computer and use it in GitHub Desktop.
Product Manager React Component
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, {Suspense} from 'react'; | |
import {BrowserRouter as Router, Route} from 'react-router-dom'; | |
import ProductManagerIndex from './ProductManagerIndex'; | |
const ProductManagerCreate = React.lazy(() => import('./ProductManagerCreate')); | |
export default function ProductManager () { | |
return ( | |
<Suspense fallback={<div>Loading...</div>}> | |
<Router> | |
<Route exact path="/" component={ProductManagerIndex} /> | |
<Route path="/new" component={ProductManagerCreate} /> | |
</Router> | |
</Suspense> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment