import { useState } from 'hono/jsx'
import { render } from 'hono/jsx/dom'
function App() {
return (<Counter />)
}
function Counter() {
const [count, setCount] = useState(0)
return (<button type="button" onClick={() => { setCount(count + 1) }}>Clicked {count} times</button>)
}
const root = document.querySelector('#root')!
// @ts-expect-error -- Element not assignable to Container
render(<App />, root)
import { useState } from 'hono/jsx'
import { render } from 'hono/jsx/dom'
function App() {
return (<Counter />)
}
function Counter() {
const [count, setCount] = useState(0)
return (<button type="button" onClick={() => { setCount(count + 1) }}>Clicked {count} times</button>)
}
const root = document.querySelector('#root')!
// @ts-expect-error -- Element not assignable to Container
render(<App />, root)