hono/jsx/dom not re-rendering on state change
hiii, can someone tell me if i'm doing something wrong with client side rendering/hydration using hono/jsx/dom? it seems to mount and render properly but then state changes don't cause it to update.
onClick={() => alert('...')}
works as expected but onClick={() => setState(...)}
does nothing, nothing in the console and no action. useEffect
also does nothing. i think i followed the Client Components page pretty closely
this is the component in question, it's rendered on both the client and server
this is the server-rendered page container, which includes the script tag for importing the client application and rendering it
i've tried variations, like putting it in the <head>
, writing it as a script instead of a module, but it doesn't seem to make a difference
i am using deno on the server and hono 4.4.10. the code is bundled for the client using esbuild with format: "esm"
and the jsxImportSource
set to hono/jsx/dom
.Client Components - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
1 Reply
You aren't bundling it to client side code