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

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?
主站蜘蛛池模板: 延吉市| 夏邑县| 霍山县| 定西市| 峨山| 井研县| 温州市| 九江县| 日照市| 邢台县| 凉山| 康乐县| 沈阳市| 故城县| 清远市| 鄂托克前旗| 泽普县| 亳州市| 海南省| 兖州市| 丰城市| 中宁县| 板桥市| 奉节县| 杂多县| 视频| 小金县| 张家川| 鹿邑县| 微山县| 元阳县| 贵德县| 临海市| 班戈县| 达州市| 贡嘎县| 汉寿县| 来宾市| 图们市| 普洱| 永和县|