function watchConnection(config): (onChange) => any;Defined in: account-kit/core/src/actions/watchConnection.ts:18
Subscribe to changes to the active connection
import { watchConnection } from "@account-kit/core";
// see createConfig for more information on how to create a config
import { config } from "./config";
watchConnection(config)(console.log);| Parameter | Type | Description |
|---|---|---|
|
| the account config |
a function which accepts an onChange callback that will be fired when the connection changes and returns a function to unsubscribe from the store
(onChange): any;| Parameter | Type |
|---|---|
| ( |
any