![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
react-hook-mighty-mouse
Advanced tools
React hook that tracks mouse events on selected element.
Demos created with React DemoTab 📑
npm install react-hook-mighty-mouse
import React from 'react';
import useMightyMouse from 'react-hook-mighty-mouse';
const App = () => {
const { position } = useMightyMouse();
return (
<div>
Mouse position x:{position.client.x} y:{position.client.y}
</div>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
useMightyMouse(
touchEnabled: boolean = true,
selectedElementId: string | null = null,
selectedElementOffset: { x: number; y: number } = { x: 0, y: 0 }
): Mouse
▶︎ indicates the default value if there's one
touchEnabled: boolean ▶︎ true
Boolean to enable/disable touch.
selectedElementId: string | null ▶︎ null
Selected element id.
selectedElementOffset: { x: number; y: number } ▶︎ { x: 0, y: 0 }
Selected element offset object.
Mouse = {
position : {
client : { x : number | null, y : number | null },
screen : { x : number | null; y : number | null },
page : { x : number | null; y : number | null },
},
buttons : {
left : boolean | null,
middle : boolean | null,
right : boolean | null,
},
keyboard : {
ctrl : boolean | null,
shift : boolean | null,
alt : boolean | null,
},
eventType : string | null,
selectedElement : {
position : { x : number | null; y : number | null, angle : number | null },
boundingRect : { left : number | null; top : number | null, width : number | null, height : number | null },
isHover : boolean
},
}
Easily set up a local development environment!
Build all the examples and starts storybook server on localhost:9009:
npm install
npm start
OR
Clone this repo on your machine, navigate to its location in the terminal and run:
npm install
npm link # link your local repo to your global packages
npm run build:watch # build the files and watch for changes
Clone project repo that you wish to test with react-hook-mighty-mouse library and run:
npm install
npm link react-hook-mighty-mouse # link your local copy into this project's node_modules
npm start
Start coding! 🎉
All contributions are welcome!
FAQs
React mouse hook
We found that react-hook-mighty-mouse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.