Components
Controlling the state with props
In this example, we created a higher-level abstraction of the Menu component that accepts the values and onValuesChange props to control the state of the menu store. These props are then passed to the MenuProvider component:
You can leverage this technique to create your own custom menu components tailored to your specific requirements. Learn more about controlling the state on the Component providers guide.