官术网_书友最值得收藏!

Rendering lists and detail views

The Git tag for this section is appointments-day-view.

So far, we’ve seen a great deal of test-driven development, but not much of React. In this section, we’ll take what we’ve learned about TDD and apply it to learning more React.

Our app at the moment just displays a single thing—a customer’s name. Now, we'll extend it so that we have a view of all appointments that are happening today.

Let's do a little more up-front design. We've got an Appointment component that takes an appointment and displays it. We can build an AppointmentsDayView component around it that takes an array of appointment objects and displays them as a list. It also displays a single Appointment component at any one time, whichever appointment is currently selected. The user can click on an Appointment and it will open up that appointment for viewing:

主站蜘蛛池模板: 兰西县| 西和县| 日喀则市| 涟水县| 阳原县| 兴安盟| 灵寿县| 临泽县| 莱州市| 柳林县| 桂阳县| 扶余县| 泾阳县| 龙井市| 稻城县| 尖扎县| 清新县| 越西县| 墨脱县| 周至县| 都兰县| 博客| 抚松县| 柘城县| 易门县| 潜山县| 炎陵县| 德保县| 桐柏县| 甘孜县| 宁海县| 抚松县| 任丘市| 轮台县| 文水县| 宁城县| 班玛县| 清流县| 齐齐哈尔市| 陇川县| 资阳市|