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

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?
主站蜘蛛池模板: 微山县| 乐安县| 渭南市| 宜宾县| 拉萨市| 沙田区| 新宁县| 长寿区| 阳新县| 余干县| 胶南市| 桐城市| 隆昌县| 竹溪县| 乌拉特中旗| 泸西县| 晋宁县| 开封县| 泽州县| 平果县| 溧阳市| 临西县| 绥芬河市| 抚宁县| 武穴市| 藁城市| 内黄县| 威远县| 禄丰县| 车致| 邹城市| 太白县| 仙游县| 宣汉县| 阿图什市| 黑河市| 巢湖市| 兴国县| 蓬溪县| 道孚县| 河源市|