-
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
Centralize Onyx subscriptions in ReportScreen #4594
Conversation
Fix the context methods more report screen organizing create more context helpers remove bad merged code remove unusued imports and fix style undo context changes remove unused line add missing session
5c7635d
to
fd2f824
Compare
@@ -26,7 +26,7 @@ export default (onyxKeyName) => { | |||
}, | |||
})(Provider); | |||
|
|||
const withOnyxKey = ({propName = onyxKeyName, transformValue = () => {}} = {}) => (WrappedComponent) => { | |||
const withOnyxKey = ({propName = onyxKeyName, transformValue} = {}) => (WrappedComponent) => { |
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.
This is unrelated but fixes an issue where we only return the value if the function is undefined
but by defaulting to an anonymous function that never happens.
✋ 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 @marcaaron in version: 1.0.85-10 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.0.86-11 🚀
|
Details
This PR should improve report switching time a bit since
withOnyx()
HOCs are fairly expensive to initialize and we can reduce the number of keys we subscribe to by passing some props to theReportScreen
children instead of creating duplicate subscriptions.Fixed Issues
Not really related to any particular issue - we are trying to improve chat switch metrics and there's a tracking issue here:
#4022
Tests
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android