With
Overview​
- This component represents a shape to be matched.
- Its props are the pattern: the shape of value you expect for this branch.
- Its
children
will be rendered if the shape defined within its other props match thevalue
prop passed to itsMatch
parent. - It takes one type parameter: the shape of the
value
prop passed to its parent. Useful for type inference. - This is pretty much a lighter version of Exact.