Replies: 1 comment 1 reply
-
Hello! You might have already solved your problem, but I'll write a solution for others with the same issue. Why is the document not defined?The Specifically, the How to fix it?To fix this, the code needs to run on the client side. You need to bundle I won't go into details, but I've created a Hono + Vite repository where Counter works. Check it out! Good luck! |
Beta Was this translation helpful? Give feedback.
-
I'm trying to setup a simple counter client component, code can be seen below. Code is minimal so it's easy to test it (first time using client components on hono)
When using the example given in the docs, an "obvious" error that document is not defined would happen, since I'm in the server.
Code:
Beta Was this translation helpful? Give feedback.
All reactions