react-docgen
react-docgen copied to clipboard
A CLI and library to extract information from React component files for documentation generation purposes.
There are some react-like libraries such as `react-lite`, `preact-compat` and other which use API of React for components including PropTypes. All `react-docgen` methods work well with these libraries. But [this...
This issue appears to be the same as https://github.com/reactjs/react-docgen/issues/150, however, now instead of it throwing an error, the entire import statement is presented as the type. In my use case,...
react-docgen can't find a component definition when the component is defined as a higher-order component: ```javascript import React from 'react'; const wrap = (CustomElement) => (props) => { props.children }...
I have multiple errors with same types when trying build docs with styleguidist  Production mode doesn't work, development mode work properly. Use react 17 with new jsx transform. Source...
Let's say I have a component like below: ``` /** * * This is geting documented */ function MyComponent(props) { /** * * This is not getting documented */ const...
I would like to document both the props and the HTML element that a react component plans on rendering: ```jsx const MyComponent = ({ foo, bar, ...restProps }) => ;...
hi,  When using TSX i delete PropsType because nice to have only in javascript (my opinion). I want to use the full power of tsx than "an another dependency"....
```JS // @flow import React from 'react'; type userAvatarProps = { name: string, url: string, size ?: number, textOnly?: boolean, }; export default function UserAvatar ({ name = '', url...
Using recent Flow "indexed access types" we get the following exception: ``` did not recognize object of type "IndexedAccessType" ``` See https://flow.org/en/docs/types/indexed-access `[email protected]` https://github.com/benjamn/ast-types/issues/596
Can react-docgen parse document tags as metadata instead of description? Like `@since`, `@see`, `@deprecated` ```ts /** * My Component * @since 1.2.0 */ export function MyComponent() {} ```