format :)

This commit is contained in:
Seth Trowbridge 2024-10-10 20:00:22 -04:00
parent 8c1f86a857
commit 1349c7c430
2 changed files with 13 additions and 6 deletions

View File

@ -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>
)
} }

View File

@ -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>,
)