Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including react-mouse-handler with all npm packages installed. Try it out:

var reactMouseHandler = require("react-mouse-handler")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-mouse-handler v0.4.4

React 鼠标事件处理组件,通过这个高阶组件封装后,子组件具备光标样式设置(cursor)、鼠标事件回调(onMouseOver、onMouseMove、onMouseDown、onMouseUp、onMouseOut、onClick、onDragStar、onDrag、onDragEnd),在回调函数中可以拿到鼠标位置数据(localX、localY、globalX、globalY、dx、dy)

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free