Fix optimization link pointing to legacy docs #8093
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8089
Before inside the "Optimizing performance" deep dive, the link with text "Performance" would send us to the legacy React docs.
Clicking on "Performance" above would send us here:
The link on this legacy page for "memo: Skipping re-rendering when props are unchanged" points to the new docs. This is the same link used in this PR.
Now clicking on "Performance" navigates to here:
Additional Considerations
Despite the old docs linking to https://react.dev/reference/react/memo#skipping-re-rendering-when-props-are-unchanged, this new page is in the Reference section for
memo
. There doesn't seem to be a comprehensive Learn section for performance.The closest I could find is https://react.dev/learn/react-compiler/introduction#optimizing-re-renders, which may be more appropriate considering the React Compiler is now stable. https://react.dev/reference/react/memo#skipping-re-rendering-when-props-are-unchanged still does mention the React Compiler, though only does so later down.
Topics in legacy link that are not covered in the new link
Topics not mentioned in either related to reducing the frequency of re-renders
"Lift content up"