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

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?
主站蜘蛛池模板: 永康市| 苏尼特右旗| 灵璧县| 双城市| 遂昌县| 晋城| 益阳市| 香格里拉县| 静乐县| 涟水县| 同江市| 牡丹江市| 视频| 丹凤县| 西畴县| 乐至县| 阳春市| 乐陵市| 罗源县| 浦江县| 长岛县| 大田县| 阿巴嘎旗| 承德县| 潞西市| 星子县| 碌曲县| 万载县| 陇西县| 苍南县| 麟游县| 上虞市| 绥宁县| 克拉玛依市| 类乌齐县| 沙湾县| 海安县| 东明县| 盐津县| 涿鹿县| 新闻|