Ways to compose React Components
React favors composition over inheritance. There are several useful ways to compose components in React. Composition is a way to get polymorphic behavior in a way that's often more flexible and easy to work with than is inheritance. If we want a component to behave differently but want to reuse some common component code we’ve already created, composition can be a good way to do that. There are many ways to get multiple React components to compose together. This article will show you some of my favorites.