I have been stuck that how we can add different click events on a single element. for that, I am adding my scenario that what I want to achieve.
So the scenario is I want to add two events on my button 1st is onClick={} 2nd is onDoubleClick={} and on both I am performing different actions. but when I add both events it calls every time the single onClick event, which means if I clicked twice it call two times onClick and one time onDoubleClick event where i just want to call only onDoubleClick event when I click twice.
Note: i want to implement this in react application.
here is my code of that button which has both onClick and onDoubleClick envets
<Button type="primary" className='btn btn-secondary'
onClick={() => console.log("once clicked")}
onDoubleClick={() => console.log("twice clicked")} > >
Two Events call
</Button>
Output: [Output of clicking button twice][1] [1]: https://i.stack.imgur.com/3zcIk.png