UNPKG

@featbit/react-client-sdk

Version:
16 lines 624 B
import { useContext } from 'react'; import context from './context'; /** * `useFlags` is a custom hook which returns all feature flags. It uses the `useContext` primitive * to access the FeatBit context set up by `withFbProvider`. As such you will still need to * use the `withFbProvider` HOC at the root of your app to initialize the React SDK and populate the * context with `fbClient` and your flags. * * @return All the feature flags configured in FeatBit */ var useFlags = function () { var flags = useContext(context).flags; return flags; }; export default useFlags; //# sourceMappingURL=useFlags.js.map