[NoQA] chore: use official react-compiler-runtime package#50491
[NoQA] chore: use official react-compiler-runtime package#50491piotrski wants to merge 2 commits intoExpensify:mainfrom piotrski:piotr-use-react-compiler-runtime
Conversation
- Replaced local `react-compiler-runtime` with the official npm package. - Updated Babel config to target React 18 by changing `runtimeModule` to `target: '18'`. - Removed local `react-compiler-runtime` implementation and its dependencies from `lib/` directory. - Updated references in `package-lock.json` and `package.json` to point to the official package.
- Updated `babel-plugin-react-compiler`, `eslint-plugin-react-compiler`, and `react-compiler-healthcheck` to the latest experimental versions. - Ensured consistency across dependencies in `package.json` to align with the latest experimental updates.
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
|
recheck |
|
@piotrski can you please upload screenshots from It should have "Memo ✨" badge next to the component that was auto-memoized. |
|
@kirillzyusko Currently, there is a bug in Dev Tools where badges are not showing up when using react-compiler-runtime. The React core team is aware of this. I’ve decided to close this for now. :) |
|
@piotrski oh, really? So far so sad, because these badges were showing up if we used custom/our version of |
|
@kirillzyusko The DevTools issue has been fixed, and here's the new PR #51233. I also managed to resolve the problem with the Jest tests. Based on my testing, react-compiler-runtime also seems to address the HMR issues. |
Details
react-compiler-runtimewith the official npm package.runtimeModuletotarget: '18'.react-compiler-runtimeimplementation and its dependencies fromlib/directory.package-lock.jsonandpackage.jsonto point to the official package.Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop