documentationjs / documentationjs/documentation

Not getting the right property types for react component using Flow

Open
#1,352 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

* What version of documentation.js are you using?: 13.1.0
* How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): CLI

I have a react native project with Flow, for some reason the documentation does not show the actual types of the given component but instead it only shows **props** as Parameters.

```
type Props = {
name?: string,
age?: number,
};
const User = (props: Props) => {
}
export default User;
```
**What it prints**
Screen Shot 2021-01-21 at 11 25 54

Instead I would like for the props to show the actual types for each property.

**Command:** `documentation serve ./packages/user/src/components/** --document-exported`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.