feature-flags-react

Official

Enable PostHog feature flags in React apps.

AuthorPostHog
Version1.0.0
Installs0

System Documentation

What problem does it solve?

PostHog feature flags for React applications help developers easily enable, test, and rollout UI changes without deploying new code.

Core Features & Use Cases

  • Flag toggling in React using useFeatureFlagEnabled and useFeatureFlagPayload to conditionally render components.
  • Variant handling with useFeatureFlagVariantKey and PostHogFeature component to render different UI per flag variant.
  • Payload-driven UI: access flag payload to customize UI without additional requests.

Quick Start

Install the PostHog React libraries, initialize PostHog, and wrap your app with PostHogProvider to start using feature flags.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: feature-flags-react
Download link: https://github.com/PostHog/skills/archive/main.zip#feature-flags-react

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.