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

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:

主站蜘蛛池模板: 伊宁县| 贵南县| 宜黄县| 蚌埠市| 曲靖市| 达拉特旗| 吉安市| 湖南省| 泸溪县| 黄平县| 大荔县| 乌恰县| 肃北| 天峻县| 奉节县| 松阳县| 乐清市| 葵青区| 邢台市| 类乌齐县| 来宾市| 虎林市| 兴城市| 大竹县| 从化市| 营口市| 博湖县| 陆丰市| 偃师市| 措勤县| 汉川市| 靖江市| 泽普县| 扎赉特旗| 尼木县| 淮南市| 台江县| 鄂尔多斯市| 凉城县| 南澳县| 呈贡县|