-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fix prop dependent withOnyx updates + add test #98
Conversation
@@ -87,20 +87,20 @@ export default function (mapOnyxToState) { | |||
* @param {*} val | |||
*/ | |||
setInitialState(statePropertyName, val) { | |||
if (!this.state.loading) { |
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.
Mostly out of curiosity: why are we reversing this if
?
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.
The logic has changed from what we had before which was incorrect.
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.
We don't need to invert the logic though it's just how I did it. Updated so this is unchanged but the logic is the same.
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!
Merging since this will remove the hold on a deploy blocker fix. Sorry @Gonals |
Details
cc @kidroca See this comment here -> #97 (comment)
We've caused a regression with prop dependent updates.
Related Issues
There are probably some if we've already started regressions.
Automated Tests
A new test to make sure withOnyx always works with prop dependent keys was added.
Linked PRs
Expensify/App#4676