DEV Community

Thiago
Thiago

Posted on

ListItem material-ui use <link> from react-router-dom.

Just follow the below example

<ListItem button component={Link} to="/"/>

Remember that you can't use <Link to="/"> outside See example:

<ThemeProvider theme={theme}>
<CssBaseline />
<Container>
<BrowserRouter>
<TemporaryDrawer />
<Routes />
</BrowserRouter>
</Container>
</ThemeProvider>

Top comments (0)