Skip to content

Note on PropTypes docs that directs users to prop-types can be confusing for new users #3632

Description

@scott-ln

I was looking for the docs on how to use defaultProps and found the PropTypes docs. The first thing I saw there was the yellow box at the top that says:

Note:
React.PropTypes has moved into a different package since React v15.5. Please use the prop-types library instead.

I read this as meaning "this page is out of date, please see those docs", especially because the yellow box looks so important, and went to that package, which has much less comprehensive documentation. (Including no mention of defaultProps currently, although that's going to be fixed.) I didn't understand until re-reading it the next day that it was intended for people using PropTypes under its old name and I was supposed to carry on reading the page.

I suspect that I may not be the only learner prone to this kind of misreading, so may I please suggest that you move the note to a little further down the page and possibly tweak the wording? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions