Skip to content

Conversation

@geferon
Copy link
Contributor

@geferon geferon commented Nov 14, 2025

Problem

Currently the Nuxt module is pretty barebones, and one major feature of Posthog imo is feature flags, so I am creating a PR to add some useful composables starting with feature flags.

Changes

Added 4 Nuxt Composables:

  • usePostHog(): posthog | undefined
  • useFeatureFlagEnabled(flag: string): Ref<boolean | undefined>
  • useFeatureFlagPayload(flag: string): Ref
  • useFeatureFlagVariantKey(flag: string): Ref<string | boolean | undefined>

Release info Sub-libraries affected

Libraries affected

  • All of them
  • posthog-js (web)
  • posthog-js-lite (web lite)
  • posthog-node
  • posthog-react-native
  • @posthog/react
  • @posthog/ai
  • @posthog/nextjs-config
  • @posthog/nuxt

Checklist

  • Tests for new code
  • Accounted for the impact of any changes across different platforms
  • Accounted for backwards compatibility of any changes (no breaking changes!)
  • Took care not to unnecessarily increase the bundle size

If releasing new changes

  • Ran pnpm changeset to generate a changeset file
  • Added the "release" label to the PR to indicate we're publishing new versions for the affected packages

@vercel
Copy link

vercel bot commented Nov 14, 2025

@geferon is attempting to deploy a commit to the PostHog Team on Vercel.

A member of the Team first needs to authorize it.

@geferon
Copy link
Contributor Author

geferon commented Nov 14, 2025

I haven't created a changeset because I'm wondering if this should be a minor or a major bump.
Hope this is helpful...

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@geferon geferon changed the title feature(nuxt): Added feature flag composables feat(nuxt): Added feature flag composables Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant