-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[flow-strict] Flow TouchableWithoutFeedback #22479
Conversation
Generated by 🚫 dangerJS |
this.setState({ | ||
toggleStatus: { | ||
...this.state.toggleStatus, | ||
[refName]: !this.state.toggleStatus[refName], | ||
[e]: !this.state.toggleStatus[e], |
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.
Keys can’t be objects, right?
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.
Well it "can", I didn't have time to run RNTester to test but at first glance this was a bit odd to me
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 believe it calls toString on Objects. So it is easily for multiple to conflict. Using a key or ID here would be better I think.
6710798
to
71efc22
Compare
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.
@TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Related to #22100 Enhance TouchableWithoutFeedback with press and target event types. There are still work to do to update `UNSAFE_componentWillReceiveProps` and `touchableGetHitSlop` to make Flow not complain about `DeprecatedEdgeInsetsPropType` inexact type. Pull Request resolved: facebook/react-native#22479 Reviewed By: RSNara Differential Revision: D13310764 Pulled By: TheSavior fbshipit-source-id: 9002e542378491fb800c8e81c63f4fbe125b563c
Related to #22100
Enhance TouchableWithoutFeedback with press and target event types.
There are still work to do to update
UNSAFE_componentWillReceiveProps
andtouchableGetHitSlop
to make Flow not complain aboutDeprecatedEdgeInsetsPropType
inexact type.Test Plan:
Changelog:
[GENERAL] [ENHANCEMENT] [TouchableWithoutFeedback.js] - Flow types
[GENERAL] [ENHANCEMENT] [RTLExample.js] - Updating onPress callback