i've started on a rewrite of the React Compiler docs thanks to the feedback from this thread: bsky.app/profile/nmn.... i want to make our compiler docs really great before the stable release, so i would love to hear more feedback! github.com/reactjs/reac...
Post
github.com[compiler] Rewrite React Compiler Docs by poteto · Pull Request #7868 · reactjs/react.devWe've received feedback that the compiler docs are difficult to understand and not prominent enough that people don't realize the compiler is a serious project and is near stable.
This PR r...
Bug on the “before compiler” code example (unless the point was to illustrate that we make mistakes when doing it manually 😅) <Item key={item.id} onClick={() => handleClick(item)} /> Item wasted renders, despite handleClick being memoized above, because onClick is assigned an inline lambda.
react-dev-git-pr7868-fbopensource.vercel.appIntroduction – ReactThe library for web and native user interfaces
Also the processedData to <Item>s map would make new elements every time anyways, so that should me memoized. Or if point was only to illustrate avoiding expensiveProcessing, then I’d say remove the unrelated code as it distracts from what is trying to be shown.
0 reposts1 like