You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The license changed to MIT. When updating ensure that MIT is one of the licenses allowed in your project.
The signature of resolvers has changed. It previously received the Program AST node as first param and recast as second param. The new signature receives the File AST node as first argument and the preconfigured parser as second argument. resolver(ast: ASTNode, parser: { parse: (string) => AST })
Node 8.10.0 or newer is required, older versions are not supported anymore
When we detect HOC react-docgen now assumes that the first argument to the HOC is the component. Previously we assumed the last argument is the component, but nearly all implementations of HOC which have multiple arguments have the component as the first argument.
React class components now require to extend another class in order to be detected as component. Previously any class having a render method was considered a react component.
New Features
Handle computed properties correctly and do not fail generation (#340)
If you are using computed properties in your react props we will now include them in the output if we can. If the expression in the computed property is a literal (string, number) we will directly use this as the name otherwise if it is an identifier we will use this an prefix it with @computed#.
Add support for TypeScript (#348)
We will now correctly parse TypeScript if the filename supplied to react-docgen has a TypeScript extension (.ts, .tsx). If you have babel already setup for TypeScript in your project then all you need to do is supply the filename via the parse options. In the output there will be a new property called tsType which will include the documentation extracted from TypeScript.