Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/reference/react/StrictMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ Every callback `ref` has some setup code and may have some cleanup code. Normall
When Strict Mode is on, React will also run **one extra setup+cleanup cycle in development for every callback `ref`.** This may feel surprising, but it helps reveal subtle bugs that are hard to catch manually.
Consider this example, which allows you to select an animal and then scroll to one of them. Notice when you switch from "Cats" to "Dogs", the console logs show that the number of animals in the list keeps growing, and the "Scroll to" buttons stop working:
Consider this example, which allows you to select an animal and then scroll to one of them. Notice when you switch from "Neo" to "Millie", the console logs show that the number of animals in the list keeps growing, and the "Scroll to" buttons stop working:
<Sandpack>
Expand Down
Loading