Skip to content

Commit aaab017

Browse files
authored
add Releases section and Release Levels doc (#4829)
1 parent 421fde4 commit aaab017

File tree

6 files changed

+65
-10
lines changed

6 files changed

+65
-10
lines changed

docs/releases/release-levels.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
id: release-levels
3+
title: Release Levels
4+
---
5+
6+
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**.
7+
8+
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.
9+
10+
:::note
11+
This approach is similar to [Canary and Experimental releases in React](https://react.dev/blog/2023/05/03/react-canaries), but with a key difference: regardless of the release level, the same version of React JS and React Native code is used.
12+
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.
13+
:::
14+
15+
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](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Renderer/README.md#react--react-native-versions)).
16+
17+
## When to Use Each Release Level
18+
19+
- **`STABLE`**:
20+
- Use for all production apps and libraries that do not need early access to unreleased features.
21+
- This is the default level for stable and nightly releases.
22+
- **`CANARY`:**
23+
- Use if you are a framework author, advanced app developer, or need to test or adopt new features before they are released in stable.
24+
- Not recommended for production or user-facing applications.
25+
- **`EXPERIMENTAL`:**
26+
- Use only for testing and providing feedback for new features in the early stages of development
27+
- Not recommended for production or user-facing applications.
28+
29+
## How to initialize React Native using Canary & Experimental
30+
31+
### Android
32+
33+
The `DefaultNewArchitectureEntryPoint` class now has a `releaseLevel` property (default: `STABLE`).
34+
The feature flag system uses this property to select the appropriate set of feature flags for the chosen release level.
35+
36+
```kotlin title="Example usage"
37+
DefaultNewArchitectureEntryPoint.releaseLevel = ReleaseLevel.CANARY
38+
DefaultNewArchitectureEntryPoint.load()
39+
```
40+
41+
The build system generates different feature flag override classes for each release level, ensuring the correct features are enabled for each stage.
42+
43+
### iOS
44+
45+
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.
46+
47+
```objc title="Example usage"
48+
[[RCTReactNativeFactory alloc] initWithDelegate:delegate releaseLevel:Canary];
49+
```
50+
51+
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.

docs/releases.md renamed to docs/releases/releases.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: releases
3-
title: Releases
3+
title: Releases Overview
44
---
55

66
import ReleasesTable from '@site/src/components/releases/ReleasesTable';
@@ -13,13 +13,13 @@ Below is the schedule and current status of recent and upcoming React Native rel
1313

1414
The different support level presented in the table are defined as such:
1515

16-
- Future
16+
- **Future**
1717
- After a new version branch gets cut, creating new Release Candidates to allow the community to test the upcoming version is very important. New RC releases are done at a high pace, as soon as viable.
18-
- Active
18+
- **Active**
1919
- Stable releases in active support receive frequent updates. Latest stable has the highest priority, and at the start of its stable cycle (right after .0 is released) multiple patches will be done as soon as possible to stabilize the version and ensure a good upgrade experience to the community.
20-
- End of Cycle
20+
- **End of Cycle**
2121
- A version in this support bracket will receive less patches, unless some important regressions need to be addressed. Once a next version becomes the new latest stable, before the version in EoC moves over into Unsupported one last patch released will be produced with the latest receive pick requests.
22-
- Unsupported
22+
- **Unsupported**
2323
- When a version is in the unsupported stage, no new released are to be expected. Only very important regressions might create exceptions to this rule; it is recommended that codebases using an unsupported version upgrade as soon as possible.
2424

2525
## Commitment to Stability
@@ -30,4 +30,4 @@ For those releases we’ll be publishing regular updates and bug fixes.
3030

3131
You can read more about our support policy on [the react-native-releases working group](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md).
3232

33-
More information on our versioning, and what we consider a breaking change is available in our [versioning policy](/contributing/versioning-policy) page.
33+
More information on our versioning, and what we consider a breaking change is available in our [versioning policy](./releases/versioning-policy) page.

website/contributing/versioning-policy.md renamed to docs/releases/versioning-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Stable releases are shipped regularly, with the latest tagged as `latest` on NPM
2626

2727
A series of releases under the same minor number is called a **minor series** (e.g. 0.76.x is the minor series for 0.76.0, 0.76.1, 0.76.2, etc.).
2828

29-
You can read more about our **commitment to stability** in [the releases page](/docs/next/releases).
29+
You can read more about our **commitment to stability** in [the releases page](./).
3030

3131
### Breaking changes
3232

website/sidebars.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export default {
1111
'using-a-listview',
1212
'troubleshooting',
1313
'platform-specific-code',
14-
'releases',
1514
'more-resources',
1615
],
1716
'Environment setup': [
@@ -64,6 +63,11 @@ export default {
6463
items: ['accessibility'],
6564
},
6665
],
66+
Releases: [
67+
'releases/releases',
68+
'releases/release-levels',
69+
'releases/versioning-policy',
70+
],
6771
Debugging: [
6872
'debugging',
6973
'react-native-devtools',

website/sidebarsContributing.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export default {
99
collapsible: false,
1010
items: [
1111
'overview',
12-
'versioning-policy',
1312
'how-to-report-a-bug',
1413
'how-to-contribute-code',
1514
'how-to-build-from-source',

website/static/_redirects

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
/contributing/how-to-contribute /contributing/overview
2020
/contributing/how-to-file-an-issue /contributing/how-to-report-a-bug
21-
/releases/release-candidate-minor /releases/release-branch-cut-and-rc0
21+
/contributing/versioning-policy /docs/next/releases/versioning-policy
22+
/releases/release-candidate-minor /docs/next/releases/versioning-policy
2223

2324
# Redirect New Architecture docs of all versions
2425
# Note: We had to delete the older versions to get redirects to work

0 commit comments

Comments
 (0)