Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native TouchableNativeFeedback

Tags:

react-native

Using React-Native has a long press error

Using TouchableHighlight And TouchableNativeFeedback

Attempted to transition from state RESPONDER_INACTIVE_PRESS_IN to RESPONDER_ACTIVE_LONG_PRESS_IN

My code

like image 398
Jelf Liang Avatar asked Jun 05 '17 06:06

Jelf Liang


People also ask

What is TouchableNativeFeedback?

A wrapper for making views respond properly to touches (Android only). On Android this component uses native state drawable to display touch feedback.

How do you handle the long press in React Native?

These long presses can be handled by passing a function to the onLongPress props of any of the "Touchable" components.

What is touchable without feedback in React Native?

The TouchableNativeFeedback makes a view to response properly on touch. This component works only for Android operating system. It uses native state drawable to display the touch feedback. It supports only a single View instance as a child node.

What is TouchableHighlight in React Native?

A wrapper for making views respond properly to touches. On press down, the opacity of the wrapped view is decreased, which allows the underlay color to show through, darkening or tinting the view.


1 Answers

This issue usually only appears in android when you are debugging. This issue https://github.com/facebook/react-native/issues/5823 goes into further detail.

Try turning debugging off and see if you still get the error.

like image 123
tnyN Avatar answered Oct 06 '22 15:10

tnyN