-
-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsx/dom documentation doesn't provide enough info for working example #3270
Comments
HI @mcshaman Thank you for raising the issue. These seem to be not bugs, but as you said, the following is right:
So, I've removed the |
I'd be happy to contribute by updating the documentation but I still can't get client components to work. I have tried hitting up the discord but haven't had any luck there either. |
Have you ever tried this code? https://github.com/yusukebe/hono-jsx-spa This is a good example of using Hono's JSX and RPC-mode. |
I came across something similar... But it requires Vite to server the client components. I assumed you could build an app using Hono and Client Components without any other tooling. Is that not the case? Another issue with this pattern is that you have to export the app from index.ts to Vite's dev server. WebSockets is an important part of app and Vite's dev server doesn't have Websockets. So using Hono's server in watch mode would be preferable. |
I understand very well what you want. Unfortunately, in most cases, the client component must be built using Vite or something similar.
If you use |
I don't want WebSockets for hot reloading I want it for actually sending messages |
Looks like this has been discussed elswhere |
Sorry for doing some necromancy here, but I'm interested if this was solved in any way by @mcshaman. I'm writing a really small app and use client components to avoid using a full blown library. Any insights? I've tried a few things like using deno's dnt, but I might be missing something. |
I was advised by one of the main homo contributors that they could see what I wanted to do but ATM I would need something like vite to handle we sockets beyond hot reload. I ended up going back to good old express 😐 |
Can I close this issue? |
Go for it |
What version of Hono are you using?
4.5.5
What runtime/platform is your app running on?
Node
What steps can reproduce the bug?
I want to try out the Client Components as documented on the docs but the documentation seems incomplete and in some case incorrect.
useState
import appears to be incorrect. Looks like it should be importing fromhono/jsx/dom
nothono/jsx
What is the expected behavior?
Enough documentation to get a working example
What do you see instead?
Documentation that is either incomplete or assumes reader has additional knowledge?
Additional information
No response
The text was updated successfully, but these errors were encountered: