In this chapter, we learned how to compose our reusable components and make them communicate effectively. Props are a way to decouple components from each other and create a clean and well-defined interface.
Then, we went through some of the most interesting composition patterns in React. The first one was the so-called container and presentational pattern, which helps us separate the logic from the presentation and create more specialized components with a single responsibility.
We saw how React tried to solve the problem of sharing functionalities between components with mixins. Unfortunately, mixins solve those problems by adding several other ones, and they affect the maintainability of our applications. One way to achieve the same goal without adding complexity is by using HoCs, which are functions that take a component and return an enhanced one.
The recompose library...