# What changed in @posthog/react

> 24 changes in @posthog/react 1 from its official release notes, upgrade guides and advisories: 1 breaking, 2 deprecations, 8 new APIs and options. Each one cited. Sources checked 2026-10-21. HTML: https://unstale.sh/npm/@posthog/react/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @posthog/react 1

### Breaking changes

- Use the posthog.init option evaluationContexts to specify evaluation contexts such as web, mobile, or checkout. (1.6.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.6.0)

### Deprecations

- The posthog.init option evaluationEnvironments is deprecated in favor of evaluationContexts; it continues to work and logs a deprecation warning. (1.6.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.6.0)
- The package is deprecated. (1.5.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.5.0)

### New APIs and options

- React error-boundary fallbacks receive a resetError callback so applications can retry rendering without remounting the boundary. (1.11.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.11.0)
- Accepts an optional defaultValue argument, returned while flags are loading or the flag is absent; supplying it narrows the return type to boolean. (1.10.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.10.0)
- Adds the useFeatureFlagResult hook. (1.8.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.8.0)
- displaySurvey gains an option to disable shown tracking. (1.7.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.7.1)
- Popover surveys support question prefill. (1.7.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.7.0)
- Adds the useThumbSurvey hook. (1.7.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.7.0)
- Feature flags can now be bootstrapped during server-side rendering in ReactJS. (1.4.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.4.0)
- Adds a component that wraps components and captures an event when they are in view in the browser. (1.3.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.3.0)

### Behavior and default changes

- React component stacks are rendered as linked exception causes so error tracking identifies the crashing component. (1.10.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.10.4)
- useThumbSurvey now tracks when a survey is shown. (1.7.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.7.1)

### Tooling

- CLI and sourcemap utilities moved to @posthog/plugin-utils to remove cross-spawn from React Native dependencies. (1.8.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.8.3)

### Fixes and other changes

- Without match, PostHogFeature shows the fallback when the flag evaluates to false. (1.11.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.11.3)
- useThumbSurvey now uses the client passed to PostHogProvider instead of capturing no survey events. (1.11.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.11.2)
- The error boundary still reports the original error when a browser extension makes Error.prototype.name non-writable. (1.11.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.11.1)
- Clarifies that false is a conclusive off evaluation and undefined means no evaluation is available; remote evaluation omits globally inactive flags, while backend local evaluation can resolve cached inactive definitions to false. (1.10.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.10.6)
- Type declarations use ReactElement<any, any> instead of importing JSX, allowing typechecking with @types/react back to the declared 16.8.0 floor. (1.10.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.10.5)
- Disabled bootstrap feature flags are filtered from useActiveFeatureFlags. (1.10.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.10.3)
- PostHogProvider no longer throws or initializes when no API key or client is provided. (1.9.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.9.1)
- Local flag evaluation cache preserves $set_once semantics. (1.9.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.9.0)
- Fixes PostHogFeature to properly handle undefined flags and false values. (1.8.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.8.1)
- Feature flag hooks now check whether the client is initialized, preventing client is undefined errors. (1.5.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/react%401.5.1)
