MCPcopy Create free account
hub / github.com/CodeWithHarry/Sigma-Web-Dev-Course / App

Function App

Video 109/src/App_1.jsx:6–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import './App.css'
5
6function App() {
7 const [count, setCount] = useState(0)
8 const a = useRef(0)
9
10 useEffect(() => {
11 a.current = a.current + 1
12 console.log(`rerendering and the value of a is ${a.current}..`)
13 });
14
15
16 return (
17 <>
18 <div>
19 <a href="https://vitejs.dev" target="_blank">
20 <img src={viteLogo} className="logo" alt="Vite logo" />
21 </a>
22 <a href="https://react.dev" target="_blank">
23 <img src={reactLogo} className="logo react" alt="React logo" />
24 </a>
25 </div>
26 <h1>Vite + React</h1>
27 <div className="card">
28 <button onClick={() => setCount((count) => count + 1)}>
29 count is {count}
30 </button>
31 <p>
32 Edit <code>src/App.jsx</code> and save to test HMR
33 </p>
34 </div>
35 <p className="read-the-docs">
36 Click on the Vite and React logos to learn more
37 </p>
38 </>
39 )
40}
41
42export default App

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected