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