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

Function App

hook-test/src/App.tsx:3–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useEffect, useState } from "react";
2
3function App() {
4 const [num, setNum] = useState(() => {
5 const num1 = 1 + 2;
6 const num2 = 2 + 3;
7 return num1 + num2
8 });
9
10 return (
11 <div onClick={() => setNum((prevNum) => prevNum + 1)}>{num}</div>
12 );
13}
14
15export default App;

Callers

nothing calls this directly

Calls 1

useStateFunction · 0.90

Tested by

no test coverage detected