Skip to content

Commit 841a1ad

Browse files
committed
Expand usage example and remove badges
1 parent 9f412ca commit 841a1ad

File tree

2 files changed

+441
-10
lines changed

2 files changed

+441
-10
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ This lets you read individual DOM nodes from the Map later.
343343

344344
<Note>
345345

346-
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.
346+
When Strict Mode is enabled, ref callbacks will run twice in development.
347+
348+
Read more about [how this helps find bugs](/reference/react/StrictMode#fixing-bugs-found-by-re-running-ref-callbacks-in-development) in callback refs.
347349

348350
</Note>
349351

0 commit comments

Comments
 (0)