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)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up