react-clock-tutorial

React tutorial adapted from Wes Bos Javascript30 - Day 02 - JS + CSS Clock tutorial. I originally created this using vanilla js as seen here.


Getting started

What you'll need
Ready! Set! CODE!!!
  1. Run npx create-react-app react-clock
    • Note: this command installs a temporary create-react-app and calls it, without polluting global installs or requiring more than one step! Learn more
  2. cd react-clock
  3. Copy the starter-files into react-clock/src
  4. npm start
  5. Set state (constructor)
  6. Get initial time (props)
  7. Set timer (componentDidMount/componentWillUnmount)
  8. Check dev tools
  9. define tick
  10. Add inline style