11 From Data to DOM

In the last chapter, you built the FormHandler module. It serves as a bridge between the form that the user interacts with and the rest of your code. By intercepting its submit event, you supply the user’s input to your Truck module, which saves it to its DataStore instance.

In this chapter, you will build the other piece of UI code, the CheckList module. Like the Truck module, it will receive data from the FormHandler, but its job is to add a checklist of pending orders to the page. When a checklist item is clicked, the CheckList will remove it from the page and signal the Truck to remove it from the DataStore. Figure 11.1 shows CoffeeRun equipped with its checklist of pending orders.

Figure 11.1  Keep those ...

Get Front-End Web Development: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.