releases.shpreview

isFeatureEnabled can now return a default when flag is missing

posthog-react-native@4.59.0

July 22, 2026PostHog JSView original ↗
1 featureThis release1 featureNew capabilitiesAI-tallied from the release notes
From the original release noteView original ↗

4.59.0

Minor Changes

  • #4222 0f2407b Thanks @turnipdabeets! - feat: add a default-value option to isFeatureEnabled

    isFeatureEnabled(key, { defaultValue: false }) now returns the given default when the flag has no value — flags not loaded yet, or no flag with that key — and the return type narrows to boolean. The option name is the same in posthog-js, posthog-js-lite, and posthog-react-native. Without defaultValue, behavior is unchanged: boolean | undefined. (2026-07-22)

Patch Changes

  • Updated dependencies [0f2407b]:
    • @posthog/core@1.45.0
    • @posthog/types@1.398.0

Fetched July 22, 2026

isFeatureEnabled can now return a default when flag is… — releases.sh