Tag: React-Router
-
NavLink ListItems not Applying activeClassName class when Clicked On – ReactJS React-Router MaterialUI
Hi everyone, A bit of a hairy issue I ran into today that took a while to track down. I’m using React Router with Material UI to render a Drawer as a sidebar: The issue was that some links were not applying the expected activeclass: <ListItemText primary={ About } /> After trawling through react-router I…
-
Adding a Link to a Drawer – Material UI and ReactJS
Hi everyone, I ran into a bit of an issue turning a menuitem into a link with Material UI and React-Router. The main problems being that underlines appeared and threw the spacing out. To summarize, use the component attribute on the ListItem: The official docs cover it here: https://material-ui.com/api/list-item/ See the following stackoverflow post for…