BA

Babel Plugin React Docgen

babel-plugin-react-docgen

Babel plugin to add react-docgen info into your code

Utilities
react
docs
docgen
babel-plugin
babel-plugin-react-docgen
Utilities
javascript
npm
frontend
open source
Stars
164
Weekly
731k
Open issues
7
Bundle
~25 kB

Installation

npm install babel-plugin-react-docgen

Code example

import { useBabelPluginReactDocgen } from "babel-plugin-react-docgen";

export function Example() {
  const value = useBabelPluginReactDocgen();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by Madushan Nishantha
  • 731k weekly downloads. Battle tested
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 7 open issues on GitHub

FAQs

Alternatives & similar libraries