- Replace
<your_account>
with your Github username in the DEMO LINK - Follow the React task guideline
Create a Clock component updating the time every second.
- use class component
- start the timer only when the component is added to the page
- Change the
Clock
component to print the time in theDevTools
console - Add a button outside the
Clock
component - The button should toggle visibility of the
Clock
(isClockVisible = true/false
) - Click the button several times and finish with the
Clock
visible - The time in the console should be printed only once each second.
- Add a prop
name
to theClock
- Every time the
name
changes print a message in the consoleThe Clock was renamed from oldName to newName
. - To check if it works add a button to the
App
that will set a random number as a name for the clock. - The time should still be printed in the console every second