Skip to content

Instantly share code, notes, and snippets.

@puttpotsawee
Created June 25, 2021 11:52
Show Gist options
  • Save puttpotsawee/2368f670f637c78471f698718139dc01 to your computer and use it in GitHub Desktop.
Save puttpotsawee/2368f670f637c78471f698718139dc01 to your computer and use it in GitHub Desktop.
Micro Frontend App Index.js
/**
*
* 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