Installation
Get started with sse-hooks in your React or Next.js project.
Quick Start
The easiest way to use sse-hooks is via our CLI tool. This allows you to interactively manage hooks and add only what you need to your project.
You can initialize the tool with:
npx sse-hooks init
yarn dlx sse-hooks init
pnpm dlx sse-hooks init
deno run -A npm:sse-hooks init
bunx sse-hooks init
Once initialized, you can manage your hooks using the following commands:
- List available hooks to see what you can install:
npx sse-hooks listyarn dlx sse-hooks listpnpm dlx sse-hooks listdeno run -A npm:sse-hooks listbunx sse-hooks list - Add a specific hook directly to your project:
npx sse-hooks add <hook-name>yarn dlx sse-hooks add <hook-name>pnpm dlx sse-hooks add <hook-name>deno run -A npm:sse-hooks add <hook-name>bunx sse-hooks add <hook-name>
That's it! The hook will be added to your project structure automatically 🚀