diff --git a/src/App.js b/src/App.js index 4a6f800f..c096cda1 100644 --- a/src/App.js +++ b/src/App.js @@ -1,20 +1,39 @@ import React from "react"; import logo from "./logo.png"; import "./App.css"; +import Clock from "./Clock.js"; class App extends React.Component { + // constructor(props) { + // super(props)}; + // // Initialise component state to contain "date" attribute with current date and time + // this.state = { date: new Date() }; + // } + // componentDidMount() { + // // Set date value in state every second to current date and time + // // Save setInterval timer ID in class variable for teardown in another class method + // this.timerId = setInterval(() => { + // this.setState({ + // date: new Date(), + // }); + // }, 1000); + // } + + // componentWillUnmount() { + // // Teardown setInterval timer with timer ID saved as class variable + // clearInterval(this.timerId); + // } render() { return (
- Edit src/App.js and save to reload.
-