Closed angelocordon closed 5 years ago
Word. Thanks for flagging! We should be using the prop-types
library, right?
Yup! I believe as of React 15, it's now a separate library.
why not just use typescript? :D
I thought about switching over to TSX, but I think that might add another barrier for entry to other contributors. I'd like to keep our prerequisites as low as possible.
We could potentially add Flow down the line as that can be a bit more optional, but for now this seems like the correct path to go on in our current state.
Assigned to @mcsmithers
Currently we have 31 warnings on missing prop validations. To follow modern best practices when composing React components, we should include prop types in our components (both for documentation purposes and type checking; will help us improve our tests).
To see all components with missing prop types, run
meteor npx lint
in your terminal and it should return you a similar list of warnings:The goal of this issue is to reduce the list down to
0
.For reference, see: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md https://reactjs.org/docs/typechecking-with-proptypes.html https://www.npmjs.com/package/prop-types