feature request. Allow to analyze reexported components

Open
#73 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react

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.

Description

help wanted idea

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?

Dominant language
TypeScript
Stars
3.8k
Forks
316
Avg merge
3h 28m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactjs/react-docgen

All issues in reactjs/react-docgen

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.