()
| 5 | import Navbar from './components/Navbar' |
| 6 | |
| 7 | function 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 | |
| 46 | export default App |
nothing calls this directly
no outgoing calls
no test coverage detected