Skip to main content

Match

Overview​

  • This component is the wrapper for the matching cases.
  • The only required prop is its children.
  • Valid children are: With, When, and Otherwise.
  • If you plan on having With cases, then you need to pass a value prop.
  • You are required to have at least one Otherwise component as children.
  • Just like Switch, but it will return all the cases that match.

Examples​