-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7b1f1f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution that
React.ComponentProps
is kind of problematic/will break if a user incorrectly implements itspropTypes
ordefaultProps
static properties. If those guys' types don't match exactly with the actual props of the component, the type will return an empty object{}
. I have DefinitelyTyped/DefinitelyTyped#32182 open to fix that.7b1f1f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have been thinking about documenting ALL the React and JSX namespace types in the Advanced section. this kind of discussion belongs there.
7b1f1f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the types in the React namespace are not supposed to be public, but it's difficult since the entire namespace is exported. But yeah putting it in the advanced section makes sense to me.
7b1f1f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then we can document that too :)