// the take
react-docgen parses React component source files with Babel and extracts structured metadata (props, types, defaultProps, methods, docblocks) as JSON, which other tools then turn into documentation. It's infrastructure for people building doc generators (react-styleguidist, Storybook's docgen plugin use it), not something an app developer reaches for directly.
Handler architecture is genuinely pluggable: componentMethodsHandler, propTypeHandler, defaultPropsHandler and friends can be composed, and you can register custom handlers/resolvers/importers instead of forking the library. It covers a wide range of component authoring styles out of the box: ES6 classes, createClass, forwardRef, plain function components, HOCs. Being Babel-based means it rides along with new JS syntax rather than needing its own parser. It's the de facto backbone for several well-known doc-gen tools, so the extraction logic has been exercised against a lot of real-world component code.
TypeScript support is explicitly in limbo — the README itself links out to an open issue about its status rather than stating it works, which is a bad sign for a tool whose main job is static analysis of typed code. It only extracts what's statically analyzable; components built through runtime factories, dynamic prop-type construction, or heavy metaprogramming won't be picked up correctly. The v5 to v6 jump changed the API enough that a chunk of ecosystem docs/blog posts and some downstream integrations are still written against the old version, so you'll hit version-mismatch confusion. As an AST-walking tool it's inherently coupled to Babel's parser behavior, so new JSX or TS syntax edge cases can silently break or mis-extract prop info until a handler is updated.
We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →