Created
June 25, 2021 11:52
-
-
Save puttpotsawee/2368f670f637c78471f698718139dc01 to your computer and use it in GitHub Desktop.
Micro Frontend App Index.js
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
/** | |
* | |
* App | |
* | |
* This component is the skeleton around the actual pages, and should only | |
* contain code that should be seen on all pages. (e.g. navigation bar) | |
*/ | |
import React from 'react'; | |
import { Router, Route } from 'react-router-dom'; | |
import { createBrowserHistory } from 'history'; | |
import Dog from 'containers/Dog'; | |
const defaultHistory = createBrowserHistory(); | |
// eslint-disable-next-line react/prop-types | |
export default function App({ history = defaultHistory }) { | |
return ( | |
<Router history={history}> | |
<Route exact path="/" component={Dog} /> | |
</Router> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment