initial commit

This commit is contained in:
Sacha Weatherstone
2021-04-06 09:29:12 +10:00
commit e16d8b734c
18 changed files with 8933 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import React, { useState, useEffect } from 'react';
import logo from './logo.svg';
import './App.css';
interface AppProps {}
function App({}: AppProps) {
// Create the count state.
const [count, setCount] = useState(0);
// Create the counter (+1 every second).
useEffect(() => {
const timer = setTimeout(() => setCount(count + 1), 1000);
return () => clearTimeout(timer);
}, [count, setCount]);
// Return the App component.
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<p>
Page has been open for <code>{count}</code> seconds.
</p>
<p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</p>
</header>
</div>
);
}
export default App;