...
/Creating a Single Orchestrating Component
Creating a Single Orchestrating Component
Learn how to collect and refactor the repeated search sort and filter components into a single, reusable React component.
We'll cover the following...
We'll cover the following...
Reviewing the effects of refactoring
Our SearchInput, Sorters, and Filters components have all been refactored to use the React render prop pattern. The code for the widgets and people data is far less complex than what we had previously in the App component. Here’s what the widgets data looks like now:
This is what the people data looks like:
One problem with this composition is that each functionality renders a separate list of the data. This is a disadvantage of the render prop pattern. It’s also immediately clear that all ...