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

React.Element should convert to PropTypes.element

Open
#180 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
427
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Right now, the flow type `React.Element` (recommended by Flow [here](https://flow.org/en/docs/react/children/#toc-enforcing-that-a-component-only-gets-a-single-child) for enforcing a single child) gets converted to `PropTypes.node`, but `PropTypes.element` is more appropriate.

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.