I have used the following syntax for adding the buttons in the side menu. All works well, but the button attribute does not show up until a refresh is done.
<ListItem
button={true}
key="Home"
onClick={() => {
toggleSidebar();
navigate("/home", { replace: false });
}}
>
<ListItemIcon>
<HomeIcon />
</ListItemIcon>
<ListItemText primary="Home" />
</ListItem>
This is how it looks like on first load:-
After I refresh the page:-
CodePudding user response:
<ListItem button={bool} is deprecated use ListItemButton instead.



