import { useRef } from 'octane'; export function useConstant(initializer: () => T, slot?: symbol): T { const ref = useRef(null, slot); if (ref.current === null) ref.current = initializer(); return ref.current; }