Skip to content
react-broadcast-sync logo

react-broadcast-sync

Sync UI state and user events across browser tabs in React apps - notifications, presence, forms, and more. A clean, type-safe abstraction over the native BroadcastChannel API.

Hook or provider

Use useBroadcastChannel for a channel local to one component, or BroadcastProvider to share one channel with your whole tree through context.

See who is online

Ping the channel to discover active tabs, and give each tab its own identity with sourceName.

Control the traffic

Filter by message type, isolate channels with namespaces, expire stale messages, and keep only the latest message when that is all you need.

Type-safe and tested

Written in TypeScript with full type inference, covered by unit and cross-browser cross-tab tests.