Skip to content
This repository was archived by the owner on Aug 10, 2018. It is now read-only.

Support for React.PropTypes.shape({ ... }) #12

Open
marcello3d opened this issue Aug 31, 2015 · 2 comments
Open

Support for React.PropTypes.shape({ ... }) #12

marcello3d opened this issue Aug 31, 2015 · 2 comments

Comments

@marcello3d
Copy link

react-docgen will create a recursive structure for React.PropTypes.shape props.

E.g.:

propTypes: {
  /** `foo` is a structured object */
  foo: React.PropTypes.shape({
    /** A sub-property of `foo` */
    bar: React.PropTypes.number
  })
}

It'd be sweet to show this in the Properties overview. (react-docgen already supports shapes and generates JSON for them.)

@marcello3d
Copy link
Author

I take that back, react-docgen doesn't fully support it yet: reactjs/react-docgen#21

@theogravity
Copy link
Contributor

react-docgen now supports it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants