Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 568 Bytes

File metadata and controls

30 lines (20 loc) · 568 Bytes

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