Routing

You can use the Menu as a navigational component by wiring it with any router library.

  1. Set the data property of each Menu item to the corresponding route path.
  2. Upon the selection of a Menu item, read the route path from the data property and push it to props.history.
  3. The component that is passed through props.children corresponds to the new route path.
Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?