Filtering and Searching Data
In this chapter, we’ll continue applying the techniques we’ve already learned to another, more complex use case.
As we work through the chapter, we’ll learn how to adjust a component’s design using tests to show us where the design is lacking. Test-driven development really helps highlight design issues when the tests get knarly. Luckily, the tests we’ve already written give us the confidence to change course and completely reinvent our design. With each change, we simply run
npm test and have our new implementation verified in a matter of seconds.
In the current workflow, users start by adding a new customer and then immediately book an appointment for that customer. Now, we’ll expand on that by allowing them to choose an existing customer before adding an appointment.
We want users to be able to quickly search through customers. There could be hundreds, maybe thousands, of customers registered with this...