I am using react and I want to be able to detect mouse and hold events without using jquery. Is this posible?
Asked
Active
Viewed 135 times
0
-
Yes, of course. This website will give you an overview about MouseEvents: [MDN MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent). – jak.b Jan 27 '18 at 03:42
3 Answers
0
if you're using React.js, try synthetic events:
onDrag, onDragEnd, onDragEnter, onDragExit,onDragLeave, onDragOver, onDragStart, onDrop

Emad Emami
- 6,089
- 3
- 28
- 38
0
You’d use componentName.addEventListener(“EventName”, myFunc)
myFunc
will fire when the specified event is triggered.
Checkout this answer on stackOverflow

Zakher Masri
- 1,097
- 1
- 16
- 19
0
You can use a react library that implements Drag and Drop. https://github.com/react-dnd/react-dnd

Justplayit
- 667
- 1
- 7
- 22