[NoQA][AI Reviewer] Add rules based on you-might-not-need-an-effect#78563
Conversation
Summary of New Performance Rules (PERF-6 through PERF-10)[PERF-6] Derive state from propsSources: Benefits:
[PERF-7] Handle prop changes without useEffectSources: Benefits:
[PERF-8] Handle events in event handlersSources: Benefits:
[PERF-9] Avoid useEffect chainsSources: Benefits:
[PERF-10] Communicate with parent components without useEffectSources: Benefits:
Overall theme: These rules encourage avoiding CC @roryabraham |
|
@roryabraham all the review comments were addressed 🫡 |
|
@mananjadhav Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@adamgrzybowski @mateuuszzzzz tagging you for the review as well 🙏 |
|
Does it need C+ review? |
|
Nice 🙌 I would reconsider one example, but overall LGTM 🟢 |
No thanks @mananjadhav 🙇🏼 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.2.96-1 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
Explanation of Change
Fixed Issues
$ #73451
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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