Convert a component that takes a required prop prop into a component where
the prop is optional by providing a default value. The opposite of requireProp.
When the returned component receives the prop, it will use it, but when none
is given it will use the default given here.
Type Parameters
Propextendsstring
Type of prop name. Must exist as a required field on Base
props.
Convert a component that takes a required prop
prop
into a component where the prop is optional by providing a default value. The opposite of requireProp. When the returned component receives the prop, it will use it, but when none is given it will use the default given here.