How to use React Router with Material UI Drawer to change content on click?

Viewed 10977

I've tried using Component={Link} to={path} but that just changes the URL. The content is displayed inside main and I've used Routes inside there like so:

<main>
  <Switch>
    <Route path={..} component={..}>
    .
    .
    .
  </Switch>
</main

But this doesn't work, the content doesn't change

Link to material UI example: https://codesandbox.io/s/v66pl

1 Answers
Related