docs/releases/release-levels.md
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
React Native provides the community with the ability to adopt individual new features as soon as their design and implementation are nearly complete, even before they are included in a stable release. This approach is known as release levels.
You can configure the release level of React Native so that your React Native instance will initialize with Feature Flags set to either EXPERIMENTAL, CANARY, or STABLE modes.
:::note
This approach is similar to Canary and Experimental releases in React, but with a key difference: regardless of the release level, the same version of React JS and React Native code is used.
React Native is also not using @canary or @experimental NPM tags, as release levels are available for both stable and nightly releases of React Native.
:::
Moreover, setting the release level to EXPERIMENTAL or CANARY will not result in consuming react@nightly or react@canary due to how react-native is consuming the React version (you can read more about it here).
STABLE:
CANARY:
EXPERIMENTAL:
The DefaultNewArchitectureEntryPoint class now has a releaseLevel property (default: STABLE).
The feature flag system uses this property to select the appropriate set of feature flags for the chosen release level.
DefaultNewArchitectureEntryPoint.releaseLevel = ReleaseLevel.CANARY
DefaultNewArchitectureEntryPoint.load()
The build system generates different feature flag override classes for each release level, ensuring the correct features are enabled for each stage.
The RCTReactNativeFactory class now has an initializer that accepts a releaseLevel parameter. The feature flag setup uses this parameter to select the correct feature flag overrides.
[[RCTReactNativeFactory alloc] initWithDelegate:delegate releaseLevel:Canary];
let factory = RCTReactNativeFactory(delegate: delegate, releaseLevel: RCTReleaseLevel.Canary)
The system ensures that only one release level is active per app instance, and will crash if multiple factories are created with different release levels.