• Evaluates a single feature flag. Automatically subscribes to streamed updates unless the streaming option was set to false. Uses Vue's inject API, so will only work if run inside a Vue setup hook or <script setup>.

    Type Parameters

    • T

      Type of the flag's value. Can be inferred if a default value is provided.

    Parameters

    • flagKey: string

      Key of the feature flag to be evaluated.

    • OptionaldefaultValue: T

      Default value to be used while flag value loads, or if flag cannot be found.

    Returns Readonly<Ref<T, T>>

    Readonly ref to the flag's value.