-
Notifications
You must be signed in to change notification settings - Fork 74
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 a bug where full state was being passed to a withOnyx selector #208
Conversation
@@ -16,6 +16,23 @@ Onyx.init({ | |||
registerStorageEventListener: () => {}, | |||
}); | |||
|
|||
class ErrorBoundary extends React.Component { |
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.
@marcaaron I ran into more cases where if there is a syntax error inside the selector function, then Jest isn't able to catch and report it.
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.
:oh-nothing: good thing we're not using any selectors yet 😄
Change LGTM!
@joelbettner bump for review please |
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 LGTM 👍
Details
There was this code that was passing the entire state object to the selector. That's wrong. Instead, it should only be passing the piece of state that the withOnyx mapping is working with.
cc @marcaaron
Related Issues
Fixes an issue I found while testing Expensify/App#12083
Automated Tests
Covered by automated tests