Use initializer callbacks for useState#53323
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
Does this cover all the changes where we use this incorrectly? |
Yes, it does. |
…ture/202-eslint-rule-stop-usage-init-function-use-state
|
@alitoshmatov 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] |
|
The eslint PR (Expensify/eslint-config-expensify#138) got approved. |
…ture/202-eslint-rule-stop-usage-init-function-use-state
Reviewer Checklist
Screenshots/VideosAndroid: Nativeeslint-android.movAndroid: mWeb ChromeiOS: Nativeeslint-ios.mp4iOS: mWeb Safarieslint-safari.mp4MacOS: Chrome / Safarieslint-web.moveslint-web2.moveslint-web3.movMacOS: Desktopeslint-desktop.mov |
|
✋ 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/mountiny in version: 9.0.72-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.72-0 🚀
|
|
This PR is failing because of issue #53662 |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.72-1 🚀
|

Explanation of Change
This PR improves the app to use initializer callbacks for useState in E/App. Also, there is a new eslint rule PR - Expensify/eslint-config-expensify#138.
Fixed Issues
$ #53322
PROPOSAL: N/A
Tests
Note: this component was migrated to the
useOnyx.src/pages/settings/Profile/CustomStatus/StatusClearAfterPage.tsx
src/components/DatePicker/CalendarPicker/index.tsx
src/components/VideoPlayer/BaseVideoPlayer.tsx
src/pages/Debug/DebugDetailsDateTimePickerPage.tsx
lastVisibleActionCreatedrow.src/pages/Debug/ReportAction/DebugReportActionCreatePage.tsx
src/pages/Debug/TransactionViolation/DebugTransactionViolationCreatePage.tsx
src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
src/pages/home/report/ReportActionsList.tsx
src/pages/iou/request/step/IOURequestStepAttendees.tsx
src/pages/settings/Subscription/CardSection/CardSection.tsx
src/pages/workspace/companyCards/assignCard/TransactionStartDateStep.tsx
Offline tests
Same as tests.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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