@farmart-tech/brave-react-adapter
    Preparing search index...

    Function useFeatureEnabled

    • Hook to check if a feature is enabled for the current context.

      This hook uses the FeatureReader from the nearest FeatureReaderProvider.

      Parameters

      • featureName: string

        Unique name of the feature to check

      • Optionaloptions: Options

        Optional configuration (e.g., inversion)

      Returns boolean | null

      Boolean representing if feature is enabled, or null while loading

      const isEnabled = useFeatureEnabled('new_checkout_flow');

      if (isEnabled === null) return <Spinner />;
      return isEnabled ? <NewCheckout /> : <OldCheckout />;