Contents

@posthog/react

1.11.3

Patch Changes

1.11.2

Patch Changes

  • #5097 ae954ab Thanks @turnipdabeets! - Fix useThumbSurvey from @posthog/react/surveys and posthog-js/react/surveys ignoring the client passed to PostHogProvider, which left it capturing no survey events. (2026-09-25)
  • Updated dependencies [ae954ab]:

1.11.1

Patch Changes

  • #5003 18b77a5 Thanks @posthog! - Set the React error boundary's component-stack error name with Object.defineProperty, so the boundary still reports the original error on pages where a browser extension has made Error.prototype.name non-writable. (2026-09-18)

1.11.0

Minor Changes

  • #4958 4a46fab Thanks @marandaneto! - Add a resetError callback to React error-boundary fallbacks so applications can retry rendering without remounting the boundary. (2026-09-14)

Patch Changes

1.10.6

Patch Changes

1.10.5

Patch Changes

  • #4645 cb7cc12 Thanks @turnipdabeets! - Type declarations no longer import the JSX namespace from react, so they typecheck against @types/react back to the declared 16.8.0 floor. Component return types are now spelled ReactElement<any, any>, which is the definition of JSX.Element — the same type, so consuming code is unaffected.

    JSX only became an exported member of the react types module in @types/react@18.2.6, so projects on older React types previously saw TS2305: Module '"react"' has no exported member 'JSX' when checking these declarations with skipLibCheck: false. (2026-08-25)

  • Updated dependencies [cb7cc12]:

1.10.4

Patch Changes

1.10.3

Patch Changes

1.10.2

Patch Changes

1.10.1

Patch Changes

1.10.0

Minor Changes

  • #3718 3aff16e Thanks @turnipdabeets! - Add an optional defaultValue argument to useFeatureFlagEnabled. When supplied, the hook returns that value instead of undefined while flags are loading or when the flag is absent, and the return type narrows to boolean. Omitting the argument keeps the existing boolean | undefined behavior. (2026-06-02)

1.9.1

Patch Changes

1.9.0

Minor Changes

Patch Changes

1.8.3

Patch Changes

1.8.2

Patch Changes

  • #3182 2304af0 Thanks @marandaneto! - refactor: use getFeatureFlagResult instead of deprecated getFeatureFlagPayload internally (2026-03-02)

1.8.1

Patch Changes

1.8.0

Minor Changes

Patch Changes

1.7.1

Patch Changes

1.7.0

Minor Changes

  • #2882 8a5a3d5 Thanks @adboio! - add support for question prefill in popover surveys, add useThumbSurvey hook (2026-01-20)

Patch Changes

1.6.0

Minor Changes

  • #2900 23770e9 Thanks @dmarticus! - Renamed evaluationEnvironments to evaluationContexts for clearer semantics. The term "contexts" better reflects that this feature is for specifying evaluation contexts (e.g., "web", "mobile", "checkout") rather than deployment environments (e.g., "staging", "production").

    Deprecated

    • posthog.init option evaluationEnvironments is now deprecated in favor of evaluationContexts. The old property will continue to work and will log a deprecation warning. It will be removed in a future major version.

    Migration Guide

     1// Before
     2posthog.init('<ph_project_api_key>', {
     3    evaluationEnvironments: ['production', 'web', 'checkout'],
     4})
     5
     6// After
     7posthog.init('<ph_project_api_key>', {
     8    evaluationContexts: ['production', 'web', 'checkout'],
     9})
    10``` (2026-01-19)
    

Patch Changes

1.5.2

Patch Changes

1.5.1

Patch Changes

1.5.0

Minor Changes

Patch Changes

1.4.1

Patch Changes

1.4.0

Minor Changes

Patch Changes

1.3.0

Minor Changes

  • #2517 46e3ca6 Thanks @pauldambra! - feat: add a component that will wrap your components and capture an event when they are in view in the browser

Patch Changes

1.2.3

Patch Changes

1.2.2

Patch Changes

1.2.1

Patch Changes

1.2.0

Minor Changes

1.1.0

Minor Changes

Patch Changes