After learning about PropTypes I wanted to test it more but it wasn’t working for me on CodePen. It took me a bit but I got it working and I wanted to share my solution so others who may be having the same problem don’t have to spend nearly as long figuring it out as I did.
PropTypes only works in development version but CodePen’s links will set you up for production version. Simply just change the end of each link from production.min.js to development.js. prop-types.min.js will need to be changed to prop-types.js.
Example pen attached.
Getting propType to work on CodePen