React Pattern: Centralized PropTypes
There are three popular ways to handle types in React: PropTypes, TypeScript and Flow. This post is about PropTypes, which are currently the most popular. In real apps with large objects, this quickly leads to a lot of code. That's a problem, because in React, you’ll often pass the same object to multiple components. Repeating these details in multiple component files breaks the DRY principle (don't repeat yourself). Repeating yourself creates a maintenance problem. The solution? Centralize your PropTypes.