# What changed in react-docgen

> 75 changes in react-docgen 6 to 8 from its official release notes, upgrade guides and advisories: 34 breaking, 11 new APIs and options. Each one cited. Sources checked 2026-10-23. HTML: https://unstale.sh/npm/react-docgen/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## react-docgen 8

### Breaking changes

- Support is dropped for Node.js 16, 17, 18, 19 and 21; supported versions are Node.js 20.9.0 or newer 20.x versions, and Node.js 22.0.0 or newer. (8.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%408.0.0)

### Fixes and other changes

- Prevents stack overflows caused by circular interface inheritance and type aliases. (8.0.4) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%408.0.4)
- Fixes a crash when classes with private fields are used. (8.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%408.0.0)

## react-docgen 7

### Breaking changes

- Now returns an array of paths to types instead of one, so callers should check whether the array has any elements. (7.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%407.0.0)
- Node.js 14 is no longer supported; the minimum supported version is 16.14.0. (7.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%407.0.0)
- Resolves to an import specifier rather than an ImportDeclaration, so callers can identify the specific specifier and should check the parent path for the declaration. (7.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%407.0.0)

### Tooling

- Adds support for React.FC in TypeScript. (7.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%407.0.0)

### Fixes and other changes

- TypeScript component props are now detected correctly when using PropsWithoutRef, PropsWithRef, or PropsWithChildren, though these types do not add props to the documentation. (7.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%407.0.0)
- Fixes detection when a class component's superclass is imported via a named import. (7.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%407.0.0)
- Fixes detection of React.Children when using ESM imports. (7.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%407.0.0)

## react-docgen 6

### Breaking changes

- The library is no longer used, affecting integrations that check and work with the AST. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The project now uses only the Babel toolchain internally, and parser ASTs no longer conform to estree. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The named export `handlers` was renamed to `builtinHandlers`. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The named export `importers` was renamed to `builtinImporters`. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The named export `resolver` was renamed to `builtinResolvers`. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- Renames the main export resolver. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The CLI no longer accepts input via stdin. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The handler formerly named `flowTypeHandler` was renamed because it handles both Flow and TypeScript. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Use this annotation to mark a component in place of the removed `@extends React.Component` annotation. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The DocumentationBuilder method `toObject` was renamed to `build`. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The exclude option was removed. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- react-docgen migrates to ES modules, which can affect how developers import and use the package. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Support for this component annotation on React class components was removed. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- This class replaces the `findAllComponentDefinitions` resolver. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The utility formerly named `resolveComponentDefinition` was renamed. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The resolver was removed; use `FindExportedDefinitionsResolver` with the `limit` option instead. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- This class replaces the `findAllExportedComponentDefinitions` resolver. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The handler API has no major changes, but integrations must use the Babel toolchain because ast-types is no longer used. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The importer argument was removed from many utilities; importing is now handled through FileState, accessible as `path.hub` on NodePath objects. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The named export is removed. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The utility was removed; the notes recommend Babel helpers or explicit checks such as `path.isMemberExpression()`. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Only Node.js 14.18.0 or newer is supported. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The method now accepts only source text and a config object, replacing its previous multi-argument signature. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The return value is always an array, including when only one component is found. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The handler was renamed, changing the capitalization of the `b` in `block`. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The package is now pure ESM, so consumers must use it as an ES module. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The CLI moved into its own package and was completely rewritten with different arguments and options. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6), [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Returned values are now ordered as defined in source code; type handling was removed because it was unused. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Resolvers now receive only a FileState argument, which provides parsing, traversal, options access, and file imports. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The extension option was removed in favor of globs. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)

### New APIs and options

- babelTypes is now exported and includes all types from @babel/types. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Adds a resolver that chains multiple resolvers using configurable chaining logic. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Adds an annotation for identifying components; its resolver is enabled by default. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Adds displayName and description to the Documentation type. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The DocumentationBuilder type is now exported for integrations. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Exports codes for detecting errors, including MISSING_DEFINITION and MULTIPLE_DEFINITIONS. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- A fail-on-warning option was added to the CLI. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- A handler option was added to the CLI. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- An importer option was added to the CLI. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- NodePath is now exported for building TypeScript integrations. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Resolvers can now be classes as well as functions. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)

### Performance

- Caches file resolution in addition to parsing; clear the caches on every file change when files can change at runtime. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)

### Behavior and default changes

- The path argument now accepts a glob. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- The handler now supports all possible kinds of functions. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Flow parsing now supports qualified type names. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The ignore option now accepts a glob. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)
- Functions returning React.Children.map are now treated as components. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Resolution now supports destructuring. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- JSDoc comments are now parsed for TypeScript structs. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)

### Tooling

- TypeScript parsing now supports files with the .cts extension. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- TypeScript parsing now supports files with the .mts extension. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- The package is written in TypeScript and now includes type definitions in its published package. (6.0.0) — [upgrade guide](https://react-docgen.dev/docs/migrate/v6)

### Fixes and other changes

- Parsing now supports class and function declarations without an identifier. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Correctly resolves values in an Object.values() call. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Handles cyclic references in PropTypes shape() and exact() methods. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Fixes handling of unresolved imported values. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Fixes using react-docgen in browsers. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Handles React.forwardRef calls that do not include a function. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Fixes TypeScript types when strict null checks are disabled. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Adds support for TSAsExpressions when stringifying expressions. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- TypeScript now handles typeof import('...') correctly. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- TypeScript now handles typeof MyType.property correctly. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- TypeScript parsing now supports all possible literal types. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Fixes a crash when using TypeScript mapped types. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
- Handling of useImperativeHandle is now correct. (6.0.0) — [release notes](https://github.com/reactjs/react-docgen/releases/tag/react-docgen%406.0.0)
