MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / App

Function App

closure-trap/src/App1.tsx:3–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useEffect, useState } from 'react';
2
3function App() {
4
5 const [count,setCount] = useState(0);
6
7 useEffect(() => {
8 console.log(count);
9
10 setInterval(() => {
11 setCount(count => count + 1);
12 }, 1000);
13 }, []);
14
15 return <div>{count}</div>
16}
17
18export default App;

Callers

nothing calls this directly

Calls 2

useStateFunction · 0.90
useEffectFunction · 0.90

Tested by

no test coverage detected