brigand / brigand/babel-plugin-flow-react-proptypes

Void Union Prop Types marked as Required

Open
#131 4 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.