Spaces:
No application file
No application file
Update src/App.jsx
#13
by
hotboxxgenn
- opened
- src/App.jsx +17 -21
src/App.jsx
CHANGED
|
@@ -1,32 +1,28 @@
|
|
| 1 |
import { useState } from 'react'
|
|
|
|
|
|
|
| 2 |
|
| 3 |
function App() {
|
| 4 |
const [count, setCount] = useState(0)
|
| 5 |
|
| 6 |
return (
|
| 7 |
-
<div
|
| 8 |
-
<
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
backgroundColor: '#007bff',
|
| 18 |
-
color: 'white',
|
| 19 |
-
border: 'none',
|
| 20 |
-
borderRadius: '5px',
|
| 21 |
-
cursor: 'pointer'
|
| 22 |
-
}}
|
| 23 |
-
>
|
| 24 |
-
Count is: {count}
|
| 25 |
</button>
|
|
|
|
|
|
|
|
|
|
| 26 |
</div>
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
Click the button to test React state management
|
| 30 |
</p>
|
| 31 |
</div>
|
| 32 |
)
|
|
|
|
| 1 |
import { useState } from 'react'
|
| 2 |
+
import reactLogo from './assets/react.svg'
|
| 3 |
+
import './App.css'
|
| 4 |
|
| 5 |
function App() {
|
| 6 |
const [count, setCount] = useState(0)
|
| 7 |
|
| 8 |
return (
|
| 9 |
+
<div className="App">
|
| 10 |
+
<div>
|
| 11 |
+
<a href="https://reactjs.org" target="_blank">
|
| 12 |
+
<img src={reactLogo} className="logo react" alt="React logo" />
|
| 13 |
+
</a>
|
| 14 |
+
</div>
|
| 15 |
+
<h1>Vite + React</h1>
|
| 16 |
+
<div className="card">
|
| 17 |
+
<button onClick={() => setCount((count) => count + 1)}>
|
| 18 |
+
count is {count}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</button>
|
| 20 |
+
<p>
|
| 21 |
+
Edit <code>src/App.jsx</code> and save to test HMR
|
| 22 |
+
</p>
|
| 23 |
</div>
|
| 24 |
+
<p className="read-the-docs">
|
| 25 |
+
Click on the Vite and React logos to learn more
|
|
|
|
| 26 |
</p>
|
| 27 |
</div>
|
| 28 |
)
|