babel-plugin-extract-react-types
v0.2.0
Published
Plugin to allow pretty-proptypes to more easily pull in component data
Downloads
108
Readme
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} />;