format :)
This commit is contained in:
parent
8c1f86a857
commit
1349c7c430
@ -2,7 +2,9 @@ import React from 'react'
|
|||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
const [count, setCount] = React.useState(0)
|
const [count, setCount] = React.useState(0)
|
||||||
return <button onClick={() => setCount((count) => count + 1)}>
|
return (
|
||||||
count is {count}
|
<button onClick={() => setCount((count) => count + 1)}>
|
||||||
</button>;
|
count is {count}
|
||||||
|
</button>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
11
src/main.tsx
11
src/main.tsx
@ -1,6 +1,11 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom/client'
|
import ReactDOM from 'react-dom/client'
|
||||||
import App from './App';
|
import App from './App'
|
||||||
|
|
||||||
const root = document.getElementById('root');
|
const root = document.getElementById('root')
|
||||||
root && ReactDOM.createRoot(root).render(<React.StrictMode><App /></React.StrictMode>);
|
root &&
|
||||||
|
ReactDOM.createRoot(root).render(
|
||||||
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>,
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user