Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Problem when using ListItem Material ui  #150

@DidierBoivin

Description

@DidierBoivin

Hey,
I am using a ListItem button to access to routes defined
Here is my routes file
`const routes = {
'/': () => ,
'/search': () => ,
'/newcase': () => ,
'/agenda': () => ,

}
export default routes;The main file is

         {[{id: 'Agendas', url: '/agenda'},{id: 'Search', url: '/search'},{ id: 'NewCase', url: '/newcase'}].map((element, index) => ( 
          
            <ListItem button key={element.id} component={A} href={element.url}>
            <ListItemIcon>{ <InboxIcon /> }</ListItemIcon>
            <ListItemText primary={element.id} />
            
          </ListItem>
          
        ))}
      </List>`

I have this message
0.chunk.js:110570 Warning: Failed prop type: Invalid prop component supplied to ForwardRef(ButtonBase). Expected an element type that can hold a ref. Did you accidentally provide a plain function component instead?

Please help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions