react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

Fix optimization link pointing to legacy docs

Open stephan-noel opened this issue 3 months ago • 3 comments

Fixes #8089

Before inside the "Optimizing performance" deep dive, the link with text "Performance" would send us to the legacy React docs.

image

Clicking on "Performance" above would send us here:

image

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:

image

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

  • Using the production build
  • Profiling (probably needs an update with the release of the new Profiler Panel)
  • Virtualization (mentioning Activity is probably related)

Topics not mentioned in either related to reducing the frequency of re-renders

"Lift content up"

stephan-noel avatar Oct 22 '25 05:10 stephan-noel

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

github-actions[bot] avatar Oct 22 '25 05:10 github-actions[bot]

@stephan-noel I agree with the points mentioned by you in the Additional Considerations in your comment above.

moijes12 avatar Oct 22 '25 07:10 moijes12

Just commenting that I didn't forget about this, I just think it needs more input from the React team. IMHO a Learn section for performance could be useful as even the new performance tracks are kind of buried under references. There are a lot of moving parts and there is some overlap with the Async docs work.

stephan-noel avatar Nov 10 '25 05:11 stephan-noel