Skip to content

feat(analytics): useFeatureFlag composable #3771

Closed

Description

@PierreBrisorgueil

Context

Phase 4 PostHog — depends on PostHog fix issue.

What

  • useFeatureFlag(flagKey) composable returning reactive ref (boolean or string variant)
  • usePostHog() composable for direct access to posthog instance
  • Handles: flags not loaded yet (default false), posthog not configured (always false)
  • onFeatureFlags callback to update reactive state when flags arrive

Acceptance criteria

  • useFeatureFlag returns reactive ref, updates when flags load
  • Works with boolean and multivariate flags
  • Returns false if posthog not configured
  • usePostHog() returns posthog instance or null
  • Unit tests

Activity

  1. added a commit that references this issue on Mar 25, 2026
    8ccf5ac
  2. added 3 commits that reference this issue on Mar 25, 2026
    940bc17
    2506a4f
    041ffce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions