Tell us about your request
Define Component.propTypes
Which service(s) is this request for?
Let us know which services(s) you want this for?
Check Web
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
It is a good practice in React to declare a Component's propTypes. It helps developers to understand what
props a component requires and which types they should be. It also helps detect errors in run time.
React will warn when props don't match what's declared.
Tell us about your request Define Component.propTypes
Which service(s) is this request for? Let us know which services(s) you want this for?
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? It is a good practice in React to declare a Component's propTypes. It helps developers to understand what props a component requires and which types they should be. It also helps detect errors in run time. React will warn when props don't match what's declared.
Code location: There are still many components without declared propTypes. Some of them that are easy to grasp: https://github.com/meedan/check-web/blob/develop/src/app/components/ExternalLink.js https://github.com/meedan/check-web/blob/develop/src/app/components/Message.js https://github.com/meedan/check-web/blob/develop/src/app/components/UserTosForm.js