/** @module @airtable/blocks/ui: useGlobalConfig */ /** */ import GlobalConfig from '../global_config'; /** * Returns the app's {@link GlobalConfig} and updates whenever any key in {@link GlobalConfig} * changes. * * @example * ```js * import {Button, useGlobalConfig} from '@airtable/blocks/ui'; * * function SyncedCounter() { * const globalConfig = useGlobalConfig(); * const count = globalConfig.get('count'); * * const increment = () => globalConfig.setAsync('count', count + 1); * const decrement = () => globalConfig.setAsync('count', count - 1); * const isEnabled = globalConfig.hasPermissionToSet('count'); * * return ( * *