GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — claude-code-source-code/src/hooks/useDynamicConfig.ts at main · chaoswork/claude-code-source-code Expand file tree/ Copy pathuseDynamicConfig.tsMore file actions 22 lines (19 loc) · 703 Bytes / Copy pathuseDynamicConfig.tsFile metadata and controls22 lines (19 loc) · 703 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import React from 'react' import { getDynamicConfig_BLOCKS_ON_INIT } from '../services/analytics/growthbook.js' /** * React hook for dynamic config values. * Returns the default value initially, then updates when the config is fetched. */ export function useDynamicConfig<T>(configName: string, defaultValue: T): T { const [configValue, setConfigValue] = React.useState<T>(defaultValue) React.useEffect(() => { if (process.env.NODE_ENV === 'test') { // Prevents a test hang when using this hook in tests return } void getDynamicConfig_BLOCKS_ON_INIT<T>(configName, defaultValue).then( setConfigValue, ) }, [configName, defaultValue]) return configValue } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |