azaek

SDK v0.1.1: Pluggable storage, WebSocket fixes, and unified error handling.

by

Custom Storage

Swap the default localStorage with IndexedDB, SQLite, a REST API, or any backend. Implement 4 async methods and pass it to BridgesProvider.

WebSocket Fixes

- Subscriptions no longer override each other when multiple hooks are active

- No more duplicate connections on rapid mounts

- Manual disconnect is now respected - no reconnect loops

Unified Error Handling

Single `onError` callback with a discriminated union. Use `error.source` to distinguish bridge errors from storage errors.

New in useBridges()

- persistenceStatus — track initial load state

- persistenceError — surface load failures

- isCustomStorage — detect active storage layer

Docs: https://cntrl.pw/docs/sdk/getting-started

Changelog: https://cntrl.pw/docs/sdk/changelog

10 views

Add a comment

Replies

Be the first to comment