Fox Events Fox Events

A typed event system for your frontend.

Fox Events is a lightweight CustomEvent-based pub/sub. Emit and listen with history, optional IndexedDB persistence, plus a React Native WebView bridge.

Install
npm
npm install fox-events
yarn
yarn add fox-events
Quickstart
ts
import { Fox } from "fox-events";

const userLogin = Fox.channel<{ userId: string }>("user:login");

userLogin.on((payload) => {
  console.log("Login:", payload.userId);
});

userLogin.emit({ userId: "u-1" });
const first = await userLogin.once();
console.log("First login:", first.userId);

Everything you need. Nothing you don’t.

A small API with great typing and debuggability, designed for apps, micro-frontends, and integrations.

Docs (by module)