Skip to content

feat: Add react-native-feature-flags plugin (SDK 54+)#307

Draft
huntie wants to merge 1 commit intoexpo:mainfrom
huntie:react-native-feature-flags
Draft

feat: Add react-native-feature-flags plugin (SDK 54+)#307
huntie wants to merge 1 commit intoexpo:mainfrom
huntie:react-native-feature-flags

Conversation

@huntie
Copy link

@huntie huntie commented Mar 24, 2026

Why

New config plugin to allow override customisation of ReactNativeFeatureFlags on iOS and Android.

This is intended for advanced users, to opt into experimental features ahead of a release level, or to disable features that conflict with a specific app setup.

⚠️ Important: Features controlled by these low level flags are always experimental and unstable.

How

  • Flag names map 1:1 to method names on the base provider class. A compile-time error will surface if a flag doesn't exist in the installed React Native version.
  • Uses dangerouslyForceOverride() on both platforms, since RCTReactNativeFactory (iOS) and Expo's Android setup already call override() during initialization.
  • iOS: Generates .mm and .h files, adds them to the Xcode project, imports via the bridging header, and inserts a call into AppDelegate.swift.
  • Android: Inserts imports and an override call into MainApplication.kt after super.onCreate() (SoLoader must be initialized first).

Test Plan

See added tests. End-to-end verified locally.

@huntie huntie force-pushed the react-native-feature-flags branch 6 times, most recently from b16f32f to c9895e7 Compare March 25, 2026 16:28
New config plugin to allow override customisation of `ReactNativeFeatureFlags` on iOS and Android.
@huntie huntie force-pushed the react-native-feature-flags branch from c9895e7 to c560e5d Compare March 25, 2026 16:46
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