PropTypes

Runtime type checking for React props and similar objects.

Articles & Tutorials

Making unit tests fail when PropTypes error (javascriptplayground.com)
Jun 03, 2019
Documenting components with React's PropTypes library is a great way to be notified when you've forgotten to pass a certain prop. Today we're going to see how we can leverage these to make our tests fail when our PropTypes are incorrect.
Understanding React PropTypes - Type-Checking in React (blog.bitsrc.io)
Feb 05, 2019
In my last post we talked about how to set default props value in our React components using the defaultProps property. In this post we will continue with the streak, we will see how to type the props argument.
  • Chidume Nnamdi
React PropTypes (flaviocopes.com)
Nov 02, 2018
How to use PropTypes to set the required type of a prop
Props and PropTypes in React (css-tricks.com)
Aug 31, 2018
React calls the data passed between components props and we’re going to look into those in great detail.
  • Kingsley Silas

Libraries

prop-types (github.com)2706
v15.7.2
Feb 14, 2019
Runtime type checking for React props and similar objects