reactjs / reactjs/react-docgen
feature request. Allow to analyze reexported components
Open
Nobody has claimed this yet.
help wanted
idea
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 316
- Avg merge
- 5h 7m
- Merged PRs (30d)
- 4
Description
AnyComponent.jsx
import * as React from 'react';
export default class AnyComponent extends React.Component {
anyMethod(){
//..
}
render(){
return (<div></div>)
}
}
Test.jsx
export {AnyComponent} from './AnyComponent';
react-docgen Test.jsx
throws exception "No suitable component definition found"
But should analysis content of AnyComponent.jsx.
What do you think about it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reexport example in Test.jsx and the component definition in AnyComponent.jsx, then run the react-docgen command shown in the issue to reproduce the exception. Trace how the CLI handles the reexport and compare it with direct component analysis. Done means Test.jsx is analyzed without the "No suitable component definition found" error and exposes AnyComponent's documentation data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100