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

Exercises

The Git tag for this section is chapter-1-exercises.
  • Rename Appointment.js and Appointment.test.js to AppointmentsDayView.js and AppointmentsDayView.test.js. While it's fine to include multiple components in one file if they form a hierarchy, you should always name the file after the root component for that hierarchy.
  • Complete the Appointment component by displaying the following fields on the page. You should use a table HTML element to give the data some visual structure. This shouldn't affect how you write your tests:
    • Customer last name, using the lastName field
    • Customer telephone number, using the phoneNumber field
    • Stylist name, using the stylist field
    • Salon service, using the service field
    • Appointment notes, using the notes field
  • Add a heading to Appointment to make it clear which appointment time is being viewed.
  • There is some repeated sample data. We've used sample data in our tests and we also have sampleAppointments in src/sampleData.js, which we used to manually test our application. Do you think it is worth drying this up? If so, why? If not, why not?
主站蜘蛛池模板: 新乡县| 临沂市| 青州市| 沙田区| 霸州市| 清远市| 正蓝旗| 广水市| 旌德县| 咸丰县| 施秉县| 宁安市| 当雄县| 隆德县| 通道| 高碑店市| 凤阳县| 南汇区| 绿春县| 廊坊市| 武山县| 宣化县| 通道| 罗源县| 西城区| 徐汇区| 台北县| 林周县| 安义县| 大名县| 浠水县| 龙川县| 嘉禾县| 西乌珠穆沁旗| 云浮市| 金华市| 泰和县| 于田县| 北票市| 保亭| 宁武县|