No arguments
The value of the feature flag.
This hook retrieves the value of a feature flag. Must be used within a <LaunchDarklyProvider>
. This is explicty a wrapper of LaunchDarkly's useFlags.
// import { useFlags } from '@octanner/prism-utilities';// import { LaunchDarklyProvider } from '@octanner/prism-utilities';// import { defaultReactOptions } from 'launchdarkly-react-client-sdk';() => {// const ldContext = useContext(defaultReactOptions.reactContext);// Use ldContext instead of mockData in your appconst mockData = {flags: {ccuiMultipleBanksP240315: true,},flagKeyMap: {ccuiMultipleBanksP240315: 'ccui-multiple-banks-p-240315',},ldClient: {},};const SomeComponent = () => {const { someLaunchDarklyFlag } = useFlags();return <div>Value: {someLaunchDarklyFlag}</div>;};return (<LaunchDarklyProvider reactSDKContext={mockData}><SomeComponent /></LaunchDarklyProvider>);};