meedan / check

Development environment for Meedan Check, a collaborative media annotation platform
https://meedan.com/check
MIT License
127 stars 53 forks source link

Define Component.propTypes #19

Closed amoedoamorim closed 4 years ago

amoedoamorim commented 4 years ago

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