Logo vun Hono React

Hono React

Communautéit
yusukebe
hono-react

When a project on Hono needs real React — for the React component ecosystem, SSR, or an SPA — drop hono/jsx and wire React in via vite-ssr-components.

Iwwersiicht

Editeuryusukebe
Repositoryskills
Skill-Nummhono-react
Stären
36
Forks
1
Matgeliwwert Fichieren
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum yusukebe op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Hono React an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/yusukebe/skills/tree/main/skills/hono-react
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/yusukebe/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/hono-react .claude/skills/hono-react
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Hono React an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Hono React automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Hono React net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Use React (not hono/jsx) on top of Hono

hono/jsx is the default for UI in a Hono project. Reach for React only when something that hono/jsx cannot satisfy makes it necessary — typically a React-only component library, a React-only ecosystem tool (e.g. a specific UI kit, charting library, headless component set), or a team requirement to standardize on React.

When that is the case, do not try to bridge hono/jsx to React. Rewrite the JSX in React and treat Hono as the server framework only.

When to reach for this skill

  • The UI needs a React-only library that has no hono/jsx equivalent.
  • You want full React SSR with hydration, not the lighter hono/jsx/dom model.
  • The team has standardized on React and the Hono side is just the server.

If none of the above applies, stay on hono/jsx — it is smaller, faster to ship, and the default for this stack. See hono and (for SPA-feel apps) hono-inertia.

Stack

  • Server: hono. Routes, middleware, validation — unchanged from any other Hono project.
  • UI: React (react, react-dom).
  • Bundling + SSR: Vite, plus vite-ssr-components for the asset wiring (Vite client, asset tags, module preloads) inside Hono responses. Use the /react entry, not /hono.
  • Deployment: Usually Cloudflare Workers via @cloudflare/vite-plugin. Start from the cloudflare-workers+vite Hono starter: https://github.com/honojs/starter/tree/main/templates/cloudflare-workers+vite

Migrating from hono/jsx to React

The rewrite is mechanical but real — do not try to keep both:

  • Remove jsxImportSource: "hono/jsx" from tsconfig.json (or switch it to react).
  • Replace hono/jsx and hono/jsx/dom imports with react / react-dom.
  • Switch vite-ssr-components/hono to vite-ssr-components/react in the root view / document component.
  • Rewrite any hono/jsx-specific hooks or helpers (useState from hono/jsx, hono/jsx/dom/css, etc.) to their React equivalents.
  • Confirm SSR output: React SSR has different streaming/hydration semantics than hono/jsx/dom.

Routing on the client

Once you are on React, the client-side routing question is open — pick what fits the app:

  • Inertia.js — works as-is with React (this is in fact its native target). If you want SPA-feel without writing a JSON API, this is the most direct option. The canonical example yusukebe/hono-inertia-example is written in React, so it transfers verbatim. (Contrast: the hono-inertia skill is the hono/jsx variant — use that if you do not need React.)
  • React Router, TanStack Router, etc. — fine. Hono just serves the shell + data endpoints; the router runs in the browser.
  • No router at all — also fine for a single-screen app. Use Hono for routes, React for the view.

There is no "official" choice here. Pick the one whose tradeoffs (file-based vs. config, data-loading model, SSR story) match the app.

Reference: vite-ssr-components

vite-ssr-components (yusukebe) is the small adapter that lets a Hono response correctly include the Vite dev client, hashed asset URLs, and module preloads in both vite dev and a production build. It has separate entries for the two JSX flavors:

  • vite-ssr-components/hono — for hono/jsx projects.
  • vite-ssr-components/react — for React projects. This is what to use here.

Read its README for the exact API:

https://github.com/yusukebe/vite-ssr-components

Pitfalls

  • Bundle size. React + react-dom is significantly heavier than hono/jsx/dom. If the only reason for the switch is "we wanted hooks", reconsider — hono/jsx has its own hooks.
  • SSR fidelity. React SSR is mature, but you still have to think about streaming vs. blocking, Suspense boundaries, and what runs only on the client. Verify the first paint of any route before shipping.
  • Workers runtime. Use react-dom/server paths that are compatible with the Workers runtime (no Node-only APIs). The @cloudflare/vite-plugin toolchain handles this if you start from the official template.
  • Do not mix hono/jsx and React in one app. Pick one. Two JSX runtimes in the same bundle is a guaranteed source of pain.

Related

  • hono — the base Hono skill. Start here.
  • hono-inertia — Inertia.js with hono/jsx (no React). Reach for that one first if you do not actually need React.
  • cloudflare — the deployment target.

Heefeg gestallte Froen

Wat mécht de KI-Skill Hono React?

When a project on Hono needs real React — for the React component ecosystem, SSR, or an SPA — drop hono/jsx and wire React in via vite-ssr-components.

Firwat Hono React op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Hono React besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Hono React an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/yusukebe/skills/tree/main/skills/hono-react an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Hono React benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Hono React benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Hono React domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Hono React gratis?

De Skill gëtt vum yusukebe op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇