-
Notifications
You must be signed in to change notification settings - Fork 5
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
WRR-12136: Converted sandstone/ThemeDecorator/AccessibilityDecorator to functional component #1774
base: develop
Are you sure you want to change the base?
Conversation
…eature/WRR-12136
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1774 +/- ##
===========================================
+ Coverage 80.87% 81.08% +0.21%
===========================================
Files 148 148
Lines 6676 6768 +92
Branches 1989 2037 +48
===========================================
+ Hits 5399 5488 +89
- Misses 969 975 +6
+ Partials 308 305 -3 ☔ View full report in Codecov by Sentry. |
…on from `useEffect`
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.
LGTM
if (prevTextSize.current !== textSize) { | ||
resizeRegistry.current.notify({}); | ||
prevTextSize.current = textSize; | ||
} |
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.
I think we don't need to declare prevTextSize to check if textSize has changed.
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.
prevTextSize
maintains a reference through re-renders and we're calling the notify
function only if textSize
is changed and differs from it's previous value; without prevTextSize
, we can't track the previous value of the textSize
Checklist
Issue Resolved / Feature Added
Converted
AccessibilityDecorator
to a functional componentResolution
Additional Considerations
Links
WRR-12136
Comments
Enact-DCO-1.0-Signed-off-by: Ion Andrusciac ion.andrusciac@lgepartner.com