Commit 635dc19
committed
Release Fragment refs to Canary (facebook#34720)
## Overview
This PR adds the `ref` prop to `<Fragment>` in `react@canary`.
This means this API is ready for final feedback and prepared for a
semver stable release.
## What this means
Shipping Fragment refs to canary means they have gone through extensive
testing in production, we are confident in the stability of the APIs,
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 these features.
## Why we follow the Canary Workflow
To prepare for semver stable, libraries should test canary features like
Fragment refs 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 Fragment refs.
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
Fragment refs 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#fragment-refs)
blog post, and [the new docs for Fragment
refs`](https://react.dev/reference/react/Fragment#fragmentinstance) for
more info.
DiffTrain build for [a4eb2df](facebook@a4eb2df)1 parent 81e8d1e commit 635dc19
File tree
26 files changed
+212
-184
lines changed- compiled-rn
- facebook-fbsource/xplat/js
- RKJSModules/vendor/react
- react-dom/cjs
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer
- implementations
- tools/eslint-plugin-react-hooks
- cjs
26 files changed
+212
-184
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
29654 | 29654 | | |
29655 | 29655 | | |
29656 | 29656 | | |
29657 | | - | |
29658 | | - | |
29659 | | - | |
| 29657 | + | |
29660 | 29658 | | |
29661 | 29659 | | |
29662 | | - | |
| 29660 | + | |
29663 | 29661 | | |
29664 | 29662 | | |
29665 | 29663 | | |
| |||
30126 | 30124 | | |
30127 | 30125 | | |
30128 | 30126 | | |
30129 | | - | |
| 30127 | + | |
30130 | 30128 | | |
30131 | 30129 | | |
30132 | 30130 | | |
30133 | | - | |
| 30131 | + | |
30134 | 30132 | | |
30135 | 30133 | | |
30136 | 30134 | | |
| |||
30167 | 30165 | | |
30168 | 30166 | | |
30169 | 30167 | | |
30170 | | - | |
| 30168 | + | |
30171 | 30169 | | |
30172 | 30170 | | |
30173 | | - | |
| 30171 | + | |
30174 | 30172 | | |
30175 | 30173 | | |
30176 | 30174 | | |
| |||
30320 | 30318 | | |
30321 | 30319 | | |
30322 | 30320 | | |
30323 | | - | |
| 30321 | + | |
30324 | 30322 | | |
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
15692 | 15692 | | |
15693 | 15693 | | |
15694 | 15694 | | |
15695 | | - | |
15696 | | - | |
15697 | | - | |
| 15695 | + | |
15698 | 15696 | | |
15699 | 15697 | | |
15700 | 15698 | | |
| |||
17578 | 17576 | | |
17579 | 17577 | | |
17580 | 17578 | | |
17581 | | - | |
| 17579 | + | |
17582 | 17580 | | |
17583 | 17581 | | |
17584 | 17582 | | |
17585 | 17583 | | |
17586 | 17584 | | |
17587 | 17585 | | |
17588 | | - | |
| 17586 | + | |
17589 | 17587 | | |
17590 | 17588 | | |
17591 | 17589 | | |
| |||
17607 | 17605 | | |
17608 | 17606 | | |
17609 | 17607 | | |
17610 | | - | |
| 17608 | + | |
17611 | 17609 | | |
17612 | 17610 | | |
17613 | | - | |
| 17611 | + | |
17614 | 17612 | | |
17615 | 17613 | | |
17616 | 17614 | | |
| |||
17717 | 17715 | | |
17718 | 17716 | | |
17719 | 17717 | | |
17720 | | - | |
| 17718 | + | |
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
17821 | 17821 | | |
17822 | 17822 | | |
17823 | 17823 | | |
17824 | | - | |
17825 | | - | |
17826 | | - | |
| 17824 | + | |
17827 | 17825 | | |
17828 | 17826 | | |
17829 | 17827 | | |
| |||
19716 | 19714 | | |
19717 | 19715 | | |
19718 | 19716 | | |
19719 | | - | |
| 19717 | + | |
19720 | 19718 | | |
19721 | 19719 | | |
19722 | 19720 | | |
19723 | 19721 | | |
19724 | 19722 | | |
19725 | 19723 | | |
19726 | | - | |
| 19724 | + | |
19727 | 19725 | | |
19728 | 19726 | | |
19729 | 19727 | | |
| |||
19745 | 19743 | | |
19746 | 19744 | | |
19747 | 19745 | | |
19748 | | - | |
| 19746 | + | |
19749 | 19747 | | |
19750 | 19748 | | |
19751 | | - | |
| 19749 | + | |
19752 | 19750 | | |
19753 | 19751 | | |
19754 | 19752 | | |
| |||
19871 | 19869 | | |
19872 | 19870 | | |
19873 | 19871 | | |
19874 | | - | |
| 19872 | + | |
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
29710 | 29710 | | |
29711 | 29711 | | |
29712 | 29712 | | |
29713 | | - | |
29714 | | - | |
29715 | | - | |
| 29713 | + | |
29716 | 29714 | | |
29717 | 29715 | | |
29718 | | - | |
| 29716 | + | |
29719 | 29717 | | |
29720 | 29718 | | |
29721 | 29719 | | |
| |||
30182 | 30180 | | |
30183 | 30181 | | |
30184 | 30182 | | |
30185 | | - | |
| 30183 | + | |
30186 | 30184 | | |
30187 | 30185 | | |
30188 | 30186 | | |
30189 | | - | |
| 30187 | + | |
30190 | 30188 | | |
30191 | 30189 | | |
30192 | 30190 | | |
| |||
30223 | 30221 | | |
30224 | 30222 | | |
30225 | 30223 | | |
30226 | | - | |
| 30224 | + | |
30227 | 30225 | | |
30228 | 30226 | | |
30229 | | - | |
| 30227 | + | |
30230 | 30228 | | |
30231 | 30229 | | |
30232 | 30230 | | |
| |||
30692 | 30690 | | |
30693 | 30691 | | |
30694 | 30692 | | |
30695 | | - | |
| 30693 | + | |
30696 | 30694 | | |
30697 | 30695 | | |
30698 | 30696 | | |
| |||
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
15692 | 15692 | | |
15693 | 15693 | | |
15694 | 15694 | | |
15695 | | - | |
15696 | | - | |
15697 | | - | |
| 15695 | + | |
15698 | 15696 | | |
15699 | 15697 | | |
15700 | 15698 | | |
| |||
17589 | 17587 | | |
17590 | 17588 | | |
17591 | 17589 | | |
17592 | | - | |
| 17590 | + | |
17593 | 17591 | | |
17594 | 17592 | | |
17595 | 17593 | | |
17596 | 17594 | | |
17597 | 17595 | | |
17598 | 17596 | | |
17599 | | - | |
| 17597 | + | |
17600 | 17598 | | |
17601 | 17599 | | |
17602 | 17600 | | |
| |||
17618 | 17616 | | |
17619 | 17617 | | |
17620 | 17618 | | |
17621 | | - | |
| 17619 | + | |
17622 | 17620 | | |
17623 | 17621 | | |
17624 | | - | |
| 17622 | + | |
17625 | 17623 | | |
17626 | 17624 | | |
17627 | 17625 | | |
| |||
17881 | 17879 | | |
17882 | 17880 | | |
17883 | 17881 | | |
17884 | | - | |
| 17882 | + | |
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
17825 | 17825 | | |
17826 | 17826 | | |
17827 | 17827 | | |
17828 | | - | |
17829 | | - | |
17830 | | - | |
| 17828 | + | |
17831 | 17829 | | |
17832 | 17830 | | |
17833 | 17831 | | |
| |||
19731 | 19729 | | |
19732 | 19730 | | |
19733 | 19731 | | |
19734 | | - | |
| 19732 | + | |
19735 | 19733 | | |
19736 | 19734 | | |
19737 | 19735 | | |
19738 | 19736 | | |
19739 | 19737 | | |
19740 | 19738 | | |
19741 | | - | |
| 19739 | + | |
19742 | 19740 | | |
19743 | 19741 | | |
19744 | 19742 | | |
| |||
19760 | 19758 | | |
19761 | 19759 | | |
19762 | 19760 | | |
19763 | | - | |
| 19761 | + | |
19764 | 19762 | | |
19765 | 19763 | | |
19766 | | - | |
| 19764 | + | |
19767 | 19765 | | |
19768 | 19766 | | |
19769 | 19767 | | |
| |||
20039 | 20037 | | |
20040 | 20038 | | |
20041 | 20039 | | |
20042 | | - | |
| 20040 | + | |
20043 | 20041 | | |
20044 | 20042 | | |
20045 | 20043 | | |
| |||
0 commit comments