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
childrenwill be rendered if the shape defined within its other props match thevalueprop passed to itsMatchparent. - It takes one type parameter: the shape of the
valueprop passed to its parent. Useful for type inference. - This is pretty much a lighter version of Exact.