How do I get the npm library to handle onTouchStart that is not being handled?

  • 0
    Hello. There is a library not written by me https://www.npmjs.com/package/react-3d -cube , which creates a 3D cube and allows you to rotate it. The problem is that the cube can only be rotated on the desktop, but in the mobile version it remains static, as I understand it, because only onMouseDown, onMouseMove, onMouseLeave and onMouseUp are processed there, but Touch is not. And now the question, experts, is how to make the onTouchStart event be handled as handleMouseDown, etc. by analogy? Maybe there are ways to rewrite the library, for example. Any suggestions are greatly appreciated. Thank you
    React Anonymous, Mar 18, 2020

  • 1 Answers
  • 0
    There is a link to the github in the lower right corner. You go there, take the source code and rewrite it however you want.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!