In the previous chapter (Chapter 3, Create Truly Reusable Components), we saw how to create reusable components with a clean interface. Now, it's time to learn how to make those components communicate with each other effectively.
React is powerful because it lets you build complex applications composing small, testable, and maintainable components. Applying this paradigm, you can take control of every single part of the application.
In this chapter, we will go through some of the most popular composition patterns and tools.
We will cover the following topics:
- How components communicate with each other using props and children
- The container and presentational pattern and how it can make our code more maintainable
- The problem mixins tried to solve and why they failed
- What HOCs are and how we can structure our applications in a better way, thanks to them...