Files changed (1) hide show
  1. 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 style={{ padding: '20px', textAlign: 'center' }}>
8
- <h1>Welcome to Your React App</h1>
9
- <p>Edit <code>src/App.jsx</code> and save to reload.</p>
10
-
11
- <div style={{ marginTop: '20px' }}>
12
- <button
13
- onClick={() => setCount((count) => count + 1)}
14
- style={{
15
- padding: '10px 20px',
16
- fontSize: '16px',
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
- <p style={{ marginTop: '20px', color: '#666' }}>
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
  )