I had in reactjs
render() {
return (
<div
onMouseDown={this.onMouseDown}
onMousUp={this.onMouseUp}
>
</div>
)
}
For the purpose of running some code while the user was holding down the element.
How can I do the same thing in react-native? Simply turning div
to View
and keeping onMouseDown
and onMouseUp
doesn't do anything on either event, and this that I found: https://stackoverflow.com/a/44984892/3310334
<View onStartShouldSetResponder={() => true}
onResponderStart={calledWhenTheTouchStarts}>
<Text>Press Me!</Text>
</View>
Looks like unintentional misusage of an API