-
Notifications
You must be signed in to change notification settings - Fork 3.7k
migrate DYNAMIC_SETTINGS_WRITE_CAPABILITY #85109
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
Changes from all commits
986cf6e
531a384
f68cc22
cc38225
4c903dc
baf65c5
2fe203f
55535fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,7 @@ function ReportSettingsPage({report, policy, route}: ReportSettingsPageProps) { | |
| shouldShowRightIcon | ||
| title={writeCapabilityText} | ||
| description={translate('writeCapabilityPage.label')} | ||
| onPress={() => Navigation.navigate(ROUTES.REPORT_SETTINGS_WRITE_CAPABILITY.getRoute(reportID, backTo))} | ||
| onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.REPORT_SETTINGS_WRITE_CAPABILITY.path))} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This navigation call builds the dynamic URL with only Useful? React with 👍 / 👎.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @huult was this addressed?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I explicitly tested this and I didn't come across this issue.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mjasikowski This issue is resolved |
||
| /> | ||
| ) : ( | ||
| <View style={[styles.ph5, styles.pv3]}> | ||
|
|
||
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.
❌ CLEAN-REACT-PATTERNS-0 (docs)
React Compiler is enabled in this codebase (
babel-plugin-react-compilerinbabel.config.js). It automatically memoizes closures based on their captured variables, making manualuseCallbackwrappers redundant. ThegoBackandupdateWriteCapabilityfunctions (lines 35 and 39) are both wrapped inuseCallback, but the compiler will handle this memoization automatically.Remove the
useCallbackwrappers and use plain functions instead:Also remove
useCallbackfrom theimport React, {useCallback} from 'react';statement on line 1.Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.