Reputation: 886
This is the body of my render()
method. Why are none of these events firing?
return (
<View
style={{flex:1}}
onPointerDown={e => this._events.emit("pointerdown", e)}
onPointerUp ={e => this._events.emit("pointerup", e)}
onPointerMove={e => this._events.emit("pointermove", e)}
>
...
</View>
);
This is inside my App.js
file. I've tried replacing the event bodies with {console.log}
and nothing is printed in my terminal or the web debug page.
Upvotes: 0
Views: 1464
Reputation: 129
These event are not firing because: onPointerUp
, onPointerDown
and onPointerMove
aren't part of react-native's View props.
If you want to handle touches, check those:
https://facebook.github.io/react-native/docs/handling-touches
or
https://facebook.github.io/react-native/docs/view.html#synthetic-touch-events
Upvotes: 1