Document defaultProps in README
scott-ln opened this issue · 5 comments
defaultProps
are not mentioned at all in the README. This is not useful if you've just gotten an error from eslint-plugin-react/require-default-props
. The top Google hit for "React defaultProps" is this page on the React site which directs you to look at the prop-types
documentation instead.
A sentence that points back to https://reactjs.org/docs/typechecking-with-proptypes.html#default-prop-values seems reasonable.
Just looked at that page again and I see now that the message at the top which I mentioned is intended for people who were using the old React.PropTypes
. That wasn't clear to me as a new user encountering an important-looking yellow box at the start of the page, so perhaps it could be moved a little further down the page.
I have no control over react’s docs; you’d have to file an issue/PR on react itself for that.
Gotcha, will do - thanks Jordan.
Closing in favor of reactjs/react.dev#3632