Skip to content

Touchable Opacity props warnings #261

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

Closed
dusave opened this issue Nov 23, 2016 · 11 comments
Closed

Touchable Opacity props warnings #261

dusave opened this issue Nov 23, 2016 · 11 comments

Comments

@dusave
Copy link

dusave commented Nov 23, 2016

I'm running into an issue where Touchable Opacity has additional props that React is throwing warnings on. I've verified in the code that those props exist on the latest version. Is there something I'm missing or should be doing?

Console: Warning: Unknown props `onStartShouldSetResponder`, `onResponderTerminationRequest`, `onResponderGrant`, `onResponderMove`, `onResponderRelease`, `onResponderTerminate` on <button> tag. Remove these props from the element.

react-dom: 15.3.2
react-native-web: 0.0.51

@necolas
Copy link
Owner

necolas commented Nov 23, 2016

Are you installing React 15.4?

@dusave
Copy link
Author

dusave commented Nov 23, 2016

No, React and React-Dom are 15.3.2. Upgrading to 15.4 throws a ton of different errors.

@necolas
Copy link
Owner

necolas commented Nov 23, 2016

Can you share a bit more info about your setup or example code

@dusave
Copy link
Author

dusave commented Nov 23, 2016

<TouchableOpacity
style={[ styles.cta, styles.primaryCta ]}
onClick={ () => this.goToLaunchLogin() }
onPress={ () => { this.goToLaunchLogin() } }>
...children...
</TouchableOpacity>

Nothing out of the ordinary AFAIK. The warnings seem to be tied to https://github.com/necolas/react-native-web/blob/master/src/components/Touchable/TouchableOpacity.js#L186

@necolas
Copy link
Owner

necolas commented Nov 24, 2016

You'll only be seeing those warnings if the ResponderEventPlugin isn't installed. I can't reproduce the warnings in the examples, so I need a more information or a test case.

@dusave
Copy link
Author

dusave commented Nov 24, 2016

I haven't explicitly installed that. It appears that it's part of react/react-native, yeah?

@gethinwebster
Copy link
Contributor

I saw this same error when I accidentally ended up with [email protected] and [email protected] installed together: fixed by downgrading to [email protected]

@necolas
Copy link
Owner

necolas commented Nov 24, 2016

That makes sense. You shouldn't need to install react-dom yourself.

@necolas necolas closed this as completed Nov 24, 2016
@dusave
Copy link
Author

dusave commented Nov 28, 2016

That was it. react-dom was getting updated to 15.4.2 thanks to semvar. Thanks for the help!

@dorthwein
Copy link

dorthwein commented Dec 1, 2016

Just wanted to confirm that installing [email protected] does resolve the issue.

@dusave
Copy link
Author

dusave commented Dec 1, 2016

Confirmed, 15.3.2 for both React and react-dom fixes this issue.

Repository owner locked and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants