Closed scott-ln closed 2 years ago
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 https://github.com/reactjs/reactjs.org/issues/3632
defaultProps
are not mentioned at all in the README. This is not useful if you've just gotten an error fromeslint-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 theprop-types
documentation instead.