azat-co / react-quickly

Source code for React Quickly [Manning, 2017]: Painless Web Apps with React, JSX, Redux, and GraphQL 📕
http://reactquickly.co
MIT License
544 stars 423 forks source link

Chapter 4.5 - Code for clock-analog-digital does not work #47

Closed oneno closed 3 years ago

oneno commented 3 years ago

Running the code shows the digital portion working. But the hands for the analog portion don't update to reflect the updating time of the digital display.

oneno commented 3 years ago

clock.jsx should be as follows as AnalogDisplay is expecting a date object to determine hour, minute, second; whereas DigitalDisplay is expecting date.toLocaleString():

clock.txt