Skip to content

Commit 68f00c9

Browse files
Release Activity in Canary (#34374)
## Overview This PR ships `<Activity />` to the `react@canary` release channel for final feedback and prepare for semver stable release. ## What this means Shipping `<Activity />` to canary means it has gone through extensive testing in production, we are confident in the stability of the feature, and we are preparing to release it in a future semver stable version. Libraries and frameworks following the [Canary Workflow](https://react.dev/blog/2023/05/03/react-canaries) should begin implementing and testing the feature. ## Why we follow the Canary Workflow To prepare for semver stable, libraries should test canary features like `<Activity>` with `react@canary` to confirm compatibility and prepare for the next semver release in a myriad of environments and configurations used throughout the React ecosystem. This provides libraries with ample time to catch any issues we missed before slamming them with problems in the wider semver release. Since these features have already gone through extensive production testing, and we are confident they are stable, frameworks following the [Canary Workflow](https://react.dev/blog/2023/05/03/react-canaries) can also begin adopting canary features like `<Activity />`. This adoption is similar to how different Browsers implement new proposed browser features before they are added to the standard. If a frameworks adopts a canary feature, they are committing to stability for their users by ensuring any API changes before a semver stable release are opaque and non-breaking to their users. Apps not using a framework are also free to adopt canary features like Activity as long as they follow the [Canary Workflow](https://react.dev/blog/2023/05/03/react-canaries), but we generally recommend waiting for a semver stable release unless you have the capacity to commit to following along with the canary changes and debugging library compatibility issues. Waiting for semver stable means you're able to benefit from libraries testing and confirming support, and use semver as signal for which version of a library you can use with support of the feature. ## Docs Check out the ["React Labs: View Transitions, Activity, and more"](https://react.dev/blog/2025/04/23/react-labs-view-transitions-activity-and-more#activity) blog post, and [the new docs for `<Activity>`](https://react.dev/reference/react/Activity) for more info. ## TODO - [x] Bump Activity docs to Canary reactjs/react.dev#7974 --------- Co-authored-by: Sebastian Sebbie Silbermann <[email protected]>
1 parent 93d7aa6 commit 68f00c9

28 files changed

+41
-36
lines changed

fixtures/view-transition/src/components/Page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {
22
unstable_addTransitionType as addTransitionType,
33
unstable_ViewTransition as ViewTransition,
4-
unstable_Activity as Activity,
4+
Activity,
55
useLayoutEffect,
66
useEffect,
77
useState,

packages/react-devtools-shared/src/__tests__/storeComponentFilters-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe('Store component filters', () => {
199199
});
200200

201201
it('should filter Activity', async () => {
202-
const Activity = React.unstable_Activity;
202+
const Activity = React.Activity || React.unstable_Activity;
203203

204204
if (Activity != null) {
205205
await actAsync(async () =>

packages/react-dom/src/__tests__/ReactDOMFragmentRefs-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('FragmentRefs', () => {
3131
jest.resetModules();
3232
React = require('react');
3333
Fragment = React.Fragment;
34-
Activity = React.unstable_Activity;
34+
Activity = React.Activity;
3535
ReactDOMClient = require('react-dom/client');
3636
ReactDOM = require('react-dom');
3737
createPortal = ReactDOM.createPortal;

packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('ReactDOMServerPartialHydration', () => {
113113
act = require('internal-test-utils').act;
114114
ReactDOMServer = require('react-dom/server');
115115
Scheduler = require('scheduler');
116-
Activity = React.unstable_Activity;
116+
Activity = React.Activity;
117117
Suspense = React.Suspense;
118118
useSyncExternalStore = React.useSyncExternalStore;
119119
if (gate(flags => flags.enableSuspenseList)) {

packages/react-dom/src/__tests__/ReactDOMServerPartialHydrationActivity-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('ReactDOMServerPartialHydrationActivity', () => {
100100
act = require('internal-test-utils').act;
101101
ReactDOMServer = require('react-dom/server');
102102
Scheduler = require('scheduler');
103-
Activity = React.unstable_Activity;
103+
Activity = React.Activity;
104104
Suspense = React.Suspense;
105105
useSyncExternalStore = React.useSyncExternalStore;
106106

packages/react-dom/src/__tests__/ReactDOMServerSelectiveHydrationActivity-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ describe('ReactDOMServerSelectiveHydrationActivity', () => {
139139
ReactDOMServer = require('react-dom/server');
140140
act = require('internal-test-utils').act;
141141
Scheduler = require('scheduler');
142-
Activity = React.unstable_Activity;
142+
Activity = React.Activity;
143143

144144
const InternalTestUtils = require('internal-test-utils');
145145
assertLog = InternalTestUtils.assertLog;

packages/react-reconciler/src/__tests__/Activity-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('Activity', () => {
2424
Scheduler = require('scheduler');
2525
act = require('internal-test-utils').act;
2626
LegacyHidden = React.unstable_LegacyHidden;
27-
Activity = React.unstable_Activity;
27+
Activity = React.Activity;
2828
useState = React.useState;
2929
useInsertionEffect = React.useInsertionEffect;
3030
useLayoutEffect = React.useLayoutEffect;
@@ -280,7 +280,7 @@ describe('Activity', () => {
280280

281281
// @gate enableActivity
282282
it('nested offscreen does not call componentWillUnmount when hidden', async () => {
283-
// This is a bug that appeared during production test of <unstable_Activity />.
283+
// This is a bug that appeared during production test of <Activity />.
284284
// It is a very specific scenario with nested Offscreens. The inner offscreen
285285
// goes from visible to hidden in synchronous update.
286286
class ClassComponent extends React.Component {

packages/react-reconciler/src/__tests__/ActivityLegacySuspense-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('Activity Suspense', () => {
2222
Scheduler = require('scheduler');
2323
act = require('internal-test-utils').act;
2424
LegacyHidden = React.unstable_LegacyHidden;
25-
Activity = React.unstable_Activity;
25+
Activity = React.Activity;
2626
Suspense = React.Suspense;
2727
useState = React.useState;
2828
useEffect = React.useEffect;

packages/react-reconciler/src/__tests__/ActivityStrictMode-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('Activity StrictMode', () => {
1010
log = [];
1111

1212
React = require('react');
13-
Activity = React.unstable_Activity;
13+
Activity = React.Activity;
1414
ReactNoop = require('react-noop-renderer');
1515
act = require('internal-test-utils').act;
1616
});

packages/react-reconciler/src/__tests__/ActivitySuspense-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('Activity Suspense', () => {
2323
Scheduler = require('scheduler');
2424
act = require('internal-test-utils').act;
2525
LegacyHidden = React.unstable_LegacyHidden;
26-
Activity = React.unstable_Activity;
26+
Activity = React.Activity;
2727
Suspense = React.Suspense;
2828
useState = React.useState;
2929
useEffect = React.useEffect;

0 commit comments

Comments
 (0)