Closed xareelee closed 7 years ago
Check docs section about this.
@agentcooper thanks for the info. I missed it.
BTW, IMOH, I think flow should correct this issue if there is a default value for the optional type, doesn't it?
Developers might only check the type of the props
to use a React component. If a prop
is optional, the developer knows that he/she won't have to pass a value to the component.
We already provide a default value if the props don't have this value, but flow still treats it as an optional type.