brigand / brigand/babel-plugin-flow-react-proptypes
Void Union Prop Types marked as Required
Open
help wanted
- Dominant language
- JavaScript
- Stars
- 427
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
When setting up a prop type as:
`foo: Foo | void`
I get the following warning in my console:
> Warning: Failed prop type: The prop `foo` is marked as required in `MyComponent`, but it's value is `undefined`.
I can make the warning go away by changing the prop definition to:
`foo? Foo`
but of course this changes the meaning of my type def.
Contributor guide
Assessment
This issue has not been assessed yet.