Skip to content

feat!: remove the fallbackFlags option - #838

Merged
roncohen merged 2 commits into
mainfrom
feat/remove-fallback-flags
Nov 28, 2026
Merged

roncohen merged 2 commits into
mainfrom
feat/remove-fallback-flags

Conversation

@roncohen

Copy link
Copy Markdown
Contributor

Removes fallbackFlags from the Browser and Node SDKs before 2.0.0, which also removes it from the React, Vue and React Native providers.

In v2 the default passed to a flag read already covers it: useFlag("huddles", true) returns true whenever the flag has no value, including offline and when the first fetch fails. On the server, fallback providers keep evaluating flags when Reflag can't be reached, and getFlag(key, default) covers flags with no value.

  • Browser: offline mode, and an initial fetch failure with nothing cached, now return no flags, so reads return their defaults. FallbackFlagOverride is no longer exported.
  • Node: with no flag definitions loaded, reads return their defaults. Fallback providers, including static, are unchanged.
  • Tests and the React Native and Next.js example apps now use read defaults. A type test checks that passing fallbackFlags to the React Native provider is an error.
  • The OpenFeature providers still use the v1 SDKs and are unchanged.

Adds a major changeset; the packages are already going to 2.0.0, so the planned versions don't change.

Tests: browser-sdk 277, node-sdk 286, react-sdk 27, vue-sdk 15, react-native-sdk 15, all passing; type tests, lint and format pass.

@reflag-review reflag-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: medium

no actionable findings

1 optional refactor suggestion.

Comment thread packages/browser-sdk/src/flag/flags.ts Resolved

@reflag-review reflag-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: medium

no actionable findings

@roncohen
roncohen added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 7e5d5a8 Nov 28, 2026
9 checks passed
@roncohen
roncohen deleted the feat/remove-fallback-flags branch November 28, 2026 19:16
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