-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use initializer callbacks for useState #53323
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works, eslint passes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rezkiy37 Changes look good to me but can you please add more thorough test for the status clear page as it was migrated to the useOnyx
?
✋ 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
lastVisibleActionCreated
row.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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop