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

Function App

Video 108/src/App.jsx:7–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import Navbar from './components/Navbar'
6
7function App() {
8 const [count, setCount] = useState(0)
9 const [first, setFirst] = useState(0)
10 const [color, setColor] = useState(0)
11
12
13 useEffect(() => {
14 alert("Count was changed")
15 setColor(color + 1)
16 }, [count])
17
18
19 return (
20 <>
21 {/* <Navbar color={"navy " + "blue" + color} /> */}
22 <div>
23 <a href="https://vitejs.dev" target="_blank">
24 <img src={viteLogo} className="logo" alt="Vite logo" />
25 </a>
26 <a href="https://react.dev" target="_blank">
27 <img src={reactLogo} className="logo react" alt="React logo" />
28 </a>
29 </div>
30 <h1>Vite + React</h1>
31 <div className="card">
32 <button onClick={() => setCount((count) => count + 1)}>
33 count is {count}
34 </button>
35 <p>
36 Edit <code>src/App.jsx</code> and save to test HMR
37 </p>
38 </div>
39 <p className="read-the-docs">
40 Click on the Vite and React logos to learn more
41 </p>
42 </>
43 )
44}
45
46export default App

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected