Skip to content

Commit a5bbeba

Browse files
committed
update references to canary/r19
1 parent 48573b0 commit a5bbeba

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/content/learn/manipulating-the-dom-with-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Starting in React 19, callback refs can return a cleanup function. When the clea
361361
>
362362
```
363363

364-
When [Strict Mode](/reference/react/StrictMode) is on in canary and experimental channels, [React detaches and re-attaches DOM refs](/reference/react/StrictMode#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development). This will stress-test callbacks like the one above by calling its cleanup function before calling the callback a second time.
364+
When [Strict Mode](/reference/react/StrictMode) is on in React 19, [React detaches and re-attaches DOM refs](/reference/react/StrictMode#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development). This will stress-test callbacks like the one above by calling its cleanup function before calling the callback a second time.
365365
</NextMajor>
366366
</DeepDive>
367367

src/content/reference/react/StrictMode.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Strict Mode enables the following development-only behaviors:
4444

4545
- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
4646
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
47-
- <CanaryBadge title="This feature is only available in the Canary channel" /> Your components will [detach and re-attach refs to components](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development) to find bugs caused by missing ref cleanup.
47+
- <NextMajorBadge title="This feature is available in React 19 beta and the React canary channel" /> Your components will [detach and re-attach refs to components](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development) to find bugs caused by missing ref cleanup.
4848
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
4949

5050
#### Props {/*props*/}
@@ -88,7 +88,7 @@ Strict Mode enables the following checks in development:
8888

8989
- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
9090
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
91-
- <CanaryBadge title="This feature is only available in the Canary channel" /> Your components will [detach and re-attach refs to components](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development) to find bugs caused by missing ref cleanup.
91+
- <NextMajorBadge title="This feature is available in React 19 beta and the React canary channel" /> Your components will [detach and re-attach refs to components](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development) to find bugs caused by missing ref cleanup.
9292
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
9393

9494
**All of these checks are development-only and do not impact the production build.**
@@ -829,15 +829,15 @@ Without Strict Mode, it was easy to miss that your Effect needed cleanup. By run
829829
---
830830
### Fixing bugs found by detaching and re-attaching refs to components in development {/*fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development*/}
831831
832-
<Canary>
833-
In canary and experimental channels, React will run an extra setup+cleanup cycle in development for refs to components, much like it does for Effects.
832+
<NextMajor>
833+
In React 19, React will run an extra setup+cleanup cycle in development for refs to components, much like it does for Effects.
834834
835835
React will detach refs to components that were created via `useRef` by setting `ref.current` to `null` before setting it to the DOM node or handle.
836836
837837
For [`ref` callbacks](/reference/react-dom/components/common#ref-callback), React will call the callback function with the DOM node or handle as its argument. It will then call the callback's [cleanup function](reference/react-dom/components/common#returns) before calling the `ref` callback function again with the DOM node as its argument.
838838
839839
You can read more about refs in [Manipulating the DOM with Refs.](/learn/manipulating-the-dom-with-refs)
840-
</Canary>
840+
</NextMajor>
841841
842842
---
843843
### Fixing deprecation warnings enabled by Strict Mode {/*fixing-deprecation-warnings-enabled-by-strict-mode*/}

0 commit comments

Comments
 (0)