Routing
You can use the Menu as a navigational component by wiring it with any router library.
- Set the
data
property of each Menu item to the corresponding route path. - Upon the selection of a Menu item, read the route path from the
data
property and push it toprops.history
. - The component that is passed through
props.children
corresponds to the new route path.
Example
View Source
Change Theme: