Hono Reactのロゴ

Hono React

コミュニティ
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.

概要

公開者yusukebe
リポジトリskills
スキル名hono-react
スター
36
フォーク
1
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    yusukebeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルHono ReactをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/yusukebe/skills/tree/main/skills/hono-react
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでHono Reactを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にHono Reactを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Hono Reactは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

よくある質問

AIスキル「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.

TypingMindでHono Reactを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Hono Reactはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにHono Reactをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/yusukebe/skills/tree/main/skills/hono-reactを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Hono Reactを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Hono Reactは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもHono Reactを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Hono React」は無料ですか?

yusukebeがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇