react long press event
问题 Is there a way to add long press event in react-web application ? I have list of addresses. On long press on any address, I want to fire event to delete that address followed by a confirm box. 回答1: You can use MouseDown, MouseUp, TouchStart, TouchEnd events to control timers that can act as a long press event. Check out the code below class App extends Component { constructor() { super() this.handleButtonPress = this.handleButtonPress.bind(this) this.handleButtonRelease = this