function watchAccount<TAccount>(type, config): (onChange) => any;Defined in: account-kit/core/src/actions/watchAccount.ts:24
Watches for changes to a specific type of account and triggers the provided callback function when changes occur.
import { watchAccount } from "@account-kit/core";
// see createConfig for more information on how to create a config
import { config } from "./config";
watchAccount("LightAccount", config)(console.log);| Type Parameter | Description |
|---|---|
| The type of account to watch |
| Parameter | Type | Description |
|---|---|---|
|
| The type of account to watch |
| The configuration containing client store settings |
A function that accepts a callback to be called when the account changes and returns a function to unsubscribe from the store
(onChange): any;| Parameter | Type |
|---|---|
| ( |
any