mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
31 lines
673 B
React
31 lines
673 B
React
import { useState } from 'react'
|
|
|
|
function App() {
|
|
const [count, setCount] = useState(0)
|
|
return (
|
|
<div className="App">
|
|
<header className="App-header">
|
|
<h1>Hello Vite + React</h1>
|
|
<p>
|
|
<button onClick={() => setCount((count) => count + 1)}>
|
|
count is: {count}
|
|
</button>
|
|
</p>
|
|
<p>
|
|
Edit <code>App.jsx</code> and save to test HMR updates.
|
|
</p>
|
|
<a
|
|
className="App-link"
|
|
href="https://reactjs.org"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
Learn React
|
|
</a>
|
|
</header>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default App
|