Skip to content

Conversation

@kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented May 6, 2025

Description

The React Compiler has finally hit RC, so it is time to start using it.

  • Updates the ESLint plugin for React Compiler and React Hooks to the new RC version
  • Add React Compiler runtime and Babel plugin
  • Remove performance related useCallback, useMemo, and React.memo usages
    • Left a few that might exist for logic reasons or I otherwise felt were unsafe to remove
    • Left the useCallback inside of useAtomCallback because I'm unsure how removing it would play out

Validation

  • Reviewer should hide whitespace changes to ease review
  • Smoke tested performance heavy parts of the app

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0
    license.
  • I have run pnpm checks to ensure code compiles and meets standards.
  • I have run pnpm test to check if all tests are passing.
  • I have covered new added functionality with unit tests if necessary.
  • I have added an entry in the Changelog.md.

@@ -1,4 +1,3 @@
/* eslint-disable react-compiler/react-compiler */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatever was causing the ESLint error before has been resolved in the latest version of the ESLint plugin.

@kmcginnes kmcginnes marked this pull request as ready for review May 6, 2025 21:11
@kmcginnes kmcginnes changed the title React compiler Add and use React Compiler May 6, 2025
@andreachild
Copy link
Contributor

LGTM

@kmcginnes kmcginnes merged commit 97552d9 into aws:main May 7, 2025
2 checks passed
@kmcginnes kmcginnes deleted the react-compiler branch May 7, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants