WSE (WebSocket Engine) React client for the Rust-based WSE server ecosystem. Current stable version 2.3.2, released monthly. Provides type-safe React hooks with auto-reconnect, offline message queue, and E2E encryption via ECDH P-256 + AES-GCM-256. Key differentiators: Rust-accelerated server with zero-GIL data path, pre-framed broadcast, and lock-free state using DashMap; client supports MessagePack binary transport, topic subscriptions, queue groups, and presence tracking. Requires Zustand for state management and natively ships TypeScript definitions.
npm install wse-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows required provider wrapping, connection status, topic subscription, and message sending.
Use import statements instead of require().
Add zustand@>=4 to your dependencies.
Ensure server enables E2E encryption or set encryption: 'optional' in client options.
Wrap your component tree with <WSEProvider>.
Wrap send in useCallback or use the stable sendRef from createWSEStore.
Change to import statements or use dynamic import().
Ensure your component is inside <WSEProvider>.
Install zustand@>=4: npm install zustand.
Set encryption: 'required' in client options or use a server that supports unencrypted connections.