How to handle multiple buttons tapped down simultaneously In React-Native

Viewed 42

I am trying to create a controller for a robot for which it must handle multiple button tap events simultaneously The Buttons are supposed to be Tapped Down and hold which would send repeated Commands to the robot on a timer.

  <TouchableOpacity
    activeOpacity={0.4}
    {...otherProps}
    delayPressOut={100}
    onPressIn={onPressIn}
    onPressOut={onPressOut}>
    {children}
  </TouchableOpacity>

There are multiple buttons That uses this component

I Have tried

onTouchStart={onPressIn} and onTouchEnd={onPressOut}

but when using this the second button is not triggered

Similar to this issue https://github.com/facebook/react-native/issues/21912

1 Answers
import { TouchableOpacity } from 'react-native-gesture-handler';

Found the Solution

Related