function watchUser(config): (onChange) => any;Defined in: account-kit/core/src/actions/watchUser.ts:20
Watches for changes to the user in the client store and triggers the provided callback when a change is detected.
import { watchUser } from "@account-kit/core";
// see createConfig for more information on how to create a config
import { config } from "./config";
watchUser(config)(console.log);| Parameter | Type | Description |
|---|---|---|
|
| the configuration containing the client store |
a function which accepts a callback that fires when the user changes and returns a function to unsubscribe from the user updates
(onChange): any;| Parameter | Type |
|---|---|
| ( |
any