UNPKG

@bigmi/react

Version:

React primitives for Bitcoin apps.

9 lines 453 B
'use client'; import { getAccount, watchAccount, } from '@bigmi/client'; import { useConfig } from './useConfig.js'; import { useSyncExternalStoreWithTracked } from './useSyncExternalStoreWithTracked.js'; export function useAccount(parameters = {}) { const config = useConfig(parameters); return useSyncExternalStoreWithTracked((onChange) => watchAccount(config, { onChange }), () => getAccount(config)); } //# sourceMappingURL=useAccount.js.map