1 import { useCallback } from 'react';
3 import { useUnleashClient } from '@unleash/proxy-client-react';
5 import type { FeatureFlag } from './UnleashFeatureFlags';
7 export const useGetFlag = () => {
8 const unleashClient = useUnleashClient();
9 return useCallback((flag: FeatureFlag) => {
10 return unleashClient.isEnabled(flag);
14 export default useGetFlag;