on* functions and always unsubscribe with the matching off* function when your
component unmounts.
For the full list of events and their payloads, see the
Events reference.
React to connection status changes
onStatusChanged fires when the connection status or session state changes.
React to account changes
onAccountsChanged fires when accounts are added or removed, or the primary account
changes. Re-read the primary party rather than caching it.
Track transactions
onTxChanged fires as a transaction submitted via prepareExecute moves through its
lifecycle (pending, signed, executed, failed).
Clean up listeners
Remove every listener when the component unmounts. Leaked listeners cause memory leaks and stale UI updates.Next steps
- Events — The full event list and payload shapes.
- Parties & Transactions — Read parties and submit transactions.