Skip to content

Commit

Permalink
Expand usage example and remove badges
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii committed May 9, 2024
1 parent 9f412ca commit 841a1ad
Show file tree
Hide file tree
Showing 2 changed files with 441 additions and 10 deletions.
4 changes: 3 additions & 1 deletion src/content/learn/manipulating-the-dom-with-refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ This lets you read individual DOM nodes from the Map later.

<Note>

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.
When Strict Mode is enabled, ref callbacks will run twice in development.

Read more about [how this helps find bugs](/reference/react/StrictMode#fixing-bugs-found-by-re-running-ref-callbacks-in-development) in callback refs.

</Note>

Expand Down
Loading

0 comments on commit 841a1ad

Please sign in to comment.