reach react router code example
Example: @reach/router
const Main = ({ children }) => (
<div>
<h1>Welcome to the App!</h1>
<ul>
<li>
<Link to="dashboard">Dashboard</Link>
</li>
<li>
<Link to="invoices">Invoices</Link>
</li>
</ul>
<hr />
{children}
</div>
)
render(
<Router>
<Main path="/">
<Invoices path="invoices" />
<Dash path="dashboard" />
</Main>
</Router>
)