Integrations
Framework Recipes
Quick frontend integration patterns for React, Vue/Nuxt, and workers.
React
Create a singleton client and subscribe in effects:
import Pusher from "@sockudo/client";
export const pusher = new Pusher("app-key", {
cluster: "mt1",
wsHost: "127.0.0.1",
wsPort: 6001,
forceTLS: false,
});
Vue / Nuxt
Initialize in plugin scope and inject in app:
import Pusher from "@sockudo/client";
const pusher = new Pusher("app-key", {
cluster: "mt1",
wsHost: "127.0.0.1",
wsPort: 6001,
forceTLS: false,
});
Web Worker
Use worker entrypoint:
import WorkerPusher from "@sockudo/client/worker";
When to Stay with Echo/Pusher-js
If you only need core channel/event behavior and existing Echo ecosystem wrappers, keep them.
Move to @sockudo/client when you need filters or delta compression.