Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

exced
Copy link
Contributor

@exced exced commented Dec 3, 2018

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.

Test Plan:

  • All flow tests succeed.

Changelog:

[GENERAL] [ENHANCEMENT] [TouchableWithoutFeedback.js] - Flow types
[GENERAL] [ENHANCEMENT] [RTLExample.js] - Updating onPress callback

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Tests This PR adds or edits a test case. labels Dec 3, 2018
@pull-bot
Copy link

pull-bot commented Dec 3, 2018

Warnings
⚠️

📋 Changelog - This PR may have incorrectly formatted Changelog.

Generated by 🚫 dangerJS

this.setState({
toggleStatus: {
...this.state.toggleStatus,
[refName]: !this.state.toggleStatus[refName],
[e]: !this.state.toggleStatus[e],
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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.

@exced exced force-pushed the flowTouchableWithoutFeedback branch from 6710798 to 71efc22 Compare December 3, 2018 21:48
@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Dec 3, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@react-native-bot
Copy link
Collaborator

@exced merged commit 7e4f92b into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Dec 5, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 5, 2018
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
rozele pushed a commit to microsoft/react-native-windows that referenced this pull request Jul 18, 2019
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Component: TouchableWithoutFeedback Flow Merged This PR has been merged. Tests This PR adds or edits a test case.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants