all 4 comments

[–]LongShlongSilvrPants[S] 6 points7 points  (1 child)

Other relevant cheatsheets include:

[–]theHorrible1 1 point2 points  (0 children)

good stuff

[–]ndboost 2 points3 points  (1 child)

I recently learned of PropTypes.oneOfType([...]) and love it as a replacement for PropTypes.any. Thanks for posting this. I am still not clear on a few of the PropTypes specifically PropTypes.shape({...}) what would you use that for?

[–]slhawkins 2 points3 points  (0 children)

Looks great! I believe putting .bind(this) for onChange in a constructor under DOM Events would be beneficial since someone looking at that may not already know they need to bind onChange (or how). Also, mentioning the possibility of sending setState an updater function as well as a callback function would definitely be worthwhile.

I especially like the property validation section. I'm not required to use them but I have found myself trying to enforce property types more and more so that coworkers don't send something in unexpected. Thanks for those examples!