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

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:

主站蜘蛛池模板: 渝中区| 扬州市| 江达县| 通渭县| 汉川市| 遂川县| 澄江县| 嵩明县| 驻马店市| 高邮市| 武陟县| 五寨县| 会理县| 色达县| 荥经县| 承德市| 新蔡县| 湘潭县| 黎平县| 大渡口区| 南投市| 泰州市| 洮南市| 南开区| 涞水县| 霍州市| 张北县| 长寿区| 厦门市| 杂多县| 重庆市| 分宜县| 通化市| 全州县| 和政县| 循化| 郎溪县| 德阳市| 宽城| 新绛县| 道真|