-
The easiest way to accomplish this is to make the ListItem
a link by using the component
prop:
That way, the ListItem
will be an anchor tag linking to the desired place, but still receive the appropriate styling so that there won't be any visual changes.
The behavior of the component
prop is documented here. Note that the href
prop will be automatically passed to the anchor tag, as specified by the last line in the props documentation:
Any other properties supplied will be spread to the root element.
- 热议问题