npm.io
0.2.0 • Published 4 years ago

babel-plugin-extract-react-types

Licence
MIT
Version
0.2.0
Deps
1
Size
7 kB
Vulns
0
Weekly
0
Stars
188

babel-plugin-extract-react-types

A Babel plugin to store the types of React components as a property on the component for documentation

Install

yarn add babel-plugin-extract-react-types pretty-proptypes

Usage

.babelrc

{
  "plugins": ["babel-plugin-extract-react-types"]
}
import SomeComponent from 'somewhere';
import Props from 'pretty-proptypes';

<Props heading="My Component" component={SomeComponent} />;

Inspiration

Keywords