Summary
The focus of this chapter has been React component property validation. When you implement property validation, you know what to expect; this promotes portability. The component doesn't care how the property values are passed to it, just as long as they're valid.
Then, we walked through several examples that used the basic React validators that check of primitive JavaScript types. You also learned that if a property is required, this must be made explicit. Then, you learned how to validate more complex property values by combining the built-in validators that come with React.
Finally, you implemented your own custom validator functions to perform validation that goes beyond what's possible with the built-in React validators. In the next chapter, you'll learn how to extend React components with new data and behavior.