Changelog
@shardwire/react
Release history for the @shardwire/react npm package.
This page lists releases for @shardwire/react. It versions independently from shardwire; check dependencies / peerDependencies in package.json on each release for the shardwire range and react peer.
npm: @shardwire/react · Core library history: shardwire.
0.5.2
- Dependency bump only: updated runtime
shardwiredependency range to^2.2.0to align with hybrid/single-process/raw updates in core.
0.5.1
- Dependency refresh release from PR 24: updated the runtime
shardwiredependency range and refreshed development dependencies; no hook API changes.
0.5.0
useShardwireMutation: Preferred hook forAppBridge.actions(pending state,lastResultincluding structured{ ok: false },lastErrorfor throws and action failures).useShardwireActionremains an alias.- Capabilities:
useShardwireCapabilitiesanduseShardwireCapabilityread negotiated capabilities and per-event/action explanations (optional explicitAppBridgeoverload). useShardwireEventState: Latest event payload or reducer-driven state fromapp.on(optional explicitAppBridgeoverload).useShardwirePreflight: Wrapsapp.preflightwithstatus,report,error, andrefresh()(optional explicitAppBridgeoverload).- Testing:
MockShardwireProvider,createMockShardwireAppBridge, andcreateMockShardwireConnectionfor unit tests. - Connection keys: Reconnect when
debugor metrics callback identity changes;useShardwireConnectionalso reconnects when strict-startupreadyinputs change (aligned withShardwireProvider).
0.4.0
useShardwireListeneroverload: Call with one argument (props only) insideShardwireProviderto subscribe using the context connection—no manualAppBridge/enabled: status === 'ready'boilerplate. The two-argument formuseShardwireListener(app, props)is unchanged (e.g. withuseShardwireConnectionwithout a provider).useShardwireAction: Typedinvoke,isPending,lastResult,lastError,resetforAppBridge.actionswhen the connection isready;invokerejects while not ready.useShardwireApp: ReturnsAppBridge | nullfrom the provider (nulluntilready).useShardwireOptional:ShardwireConnection | nullwithout throwing outside a provider (used internally so hooks follow Rules of React; advanced composition).- Re-exports:
diagnoseShardwireAppandformatShardwireDiagnosisfromshardwire/clientfor one-import dashboards.
0.3.2
- Docs: npm README — Shields.io badges (version, downloads, license, Node, React peer); install and lead copy tuned for npm/GitHub. No hook API changes.
0.3.1
- Docs: Refreshed the npm package README (accurate
ShardwireProvideroptionsanduseShardwirestatus handling;VITE_SHARDWIRE_*env names). - Packaging: Added root
LICENSE(MIT) alongside the publishedREADME. No hook API changes.
0.3.0
- Breaking: Replaced
useShardwireBridge,useShardwireCapabilities, anduseShardwireEventwithuseShardwireConnection(discriminated status + capabilities onready), optionalShardwireProvider/useShardwire, anduseShardwireListener(object argument; stable filter fingerprint). - DX: Connection reconnect key now covers
reconnect,requestTimeoutMs, andmetricsshape (not function identity).loggerchanges still require remount or parentkeyif you need a fresh bridge instance. - Types: Curated type re-exports from
@shardwire/reactfor common app-bridge types.
0.2.0
- Breaking:
engines.node>=22.0.0(matchesshardwire2.x). - Dependency:
shardwire^2.0.0(see shardwire 2.0.0 changelog).
0.1.4
- Dependency:
shardwire^1.9.3(browser-safe request IDs; see shardwire 1.9.3 changelog).
0.1.3
shardwireis now a runtimedependency(^1.9.3) sonpm install @shardwire/react reactis enough for hook-only apps.reactremains the only peer dependency.
0.1.2
- Peer dependency:
shardwire>= 1.9.2(nativeWebSocketin browser app bridges; see shardwire 1.9.2 changelog).
0.1.1
- Hooks now import
shardwire/clientso Vite/browser builds avoiddiscord.js/zlib-syncresolution errors. - Peer dependency:
shardwire>= 1.9.1(required for theshardwire/clientexport).
0.1.0
Initial public release of optional React hooks for app-side bridges.
useShardwireBridge,useShardwireCapabilities, anduseShardwireEvent— thin hooks aroundconnectBotBridgefor dashboards and controllers.- Peer dependencies:
react>= 18,shardwire>= 1.9.0(neither is bundled). - Published from
packages/reactwith ESM + CJS builds and TypeScript declarations.