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