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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More