Skip to content

Instantly share code, notes, and snippets.

@duanebester
Last active March 14, 2019 16:35
Show Gist options
  • Save duanebester/6a717220df05c1b010493e2e5d4c7d3e to your computer and use it in GitHub Desktop.
Save duanebester/6a717220df05c1b010493e2e5d4c7d3e to your computer and use it in GitHub Desktop.
Product Manager React Component
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