A lightweight (1.7 kB) package to easily track mouse position in React.js

Overview

useMousePosition - a custom React hook

A lightweight (1.7 kB) package to easily track mouse position in React.js

Install

npm install react-use-mouse-position

Example

import React from 'react'
import { useMousePosition } from 'react-use-mouse-position'

function MyApp() {
  const { mouseX, mouseY } = useMousePosition();
  console.log('mouseX:', mouseX) 

}
You might also like...
An npm package that lets you jump right into coding React and Redux with universal (isomorphic) rendering. Only manage Express setups or Webpack configurations if you want to.

Universal Redux What and Why Universal Redux is an npm package that when used as a dependency in your project provides a universal (isomorphic) render

Initial directory structure and package.json as a seed for new React based projects.

React Project Seed This serves as a seed for starting new React projects. It's less of a boilerplate and more of a suggested directory structure that

an npm package for displaying and direct updating state for prototypes on React

React state-control A bunch of lightweight components for updating the model stored in React's stateful components for fast prototyping. Complete libr

💶 The package allows you accept payment using Lazerpay in your react native mobile app ⚡️
💶 The package allows you accept payment using Lazerpay in your react native mobile app ⚡️

Lazerpay Official react-native sdk Lazerpay SDK allows you accept payments easily in your react-native application Installation npm install lazerpay-r

React package that is an Ergo dApp Connector. Current supported wallets are Nautilus Wallet and SafeW.
React package that is an Ergo dApp Connector. Current supported wallets are Nautilus Wallet and SafeW.

Ergo dApp Connector React Package Table of Contents About The Project Built With Getting Started Prerequisites Installation Usage Contributing License

This package contains the source code of the React components for the Cloudscape Design System.

React components for Cloudscape Design System This package contains the source code of the React components for the Cloudscape Design System. Cloudsca

ReservoirKit is a react package that makes it easy to add buying NFTs into your dApp. It's intuitive, responsive and customizable.

ReservoirKit is a react package that makes it easy to add buying NFTs into your dApp. It's intuitive, responsive and customizable.

Lightweight, modern boilerplate built with electron, typescript, react, and material-ui.

This app was designed for the intent of being able to select participants in an auction to be selected and displayed on all the devices connected to a web-socket server running on a device. Without the server running and properly connected, it will not work as intended. You can find the web-socket here.

Solana-boilerplate - Lightweight boilerplate for Solana dapps. Allows quick building and prototyping
Solana-boilerplate - Lightweight boilerplate for Solana dapps. Allows quick building and prototyping

Solana Boilerplate Lightweight boilerplate for Solana dapps. Allows quick buildi

Releases(v1.0.0)
  • v1.0.0(Feb 2, 2022)

    What's New?

    First release of react-use-mouse-position, a lightweight package containing simple hook to track current mouse position.

    Bugs

    Please direct all bugs here

    Requests/Ideas?

    Reach out to me @hxf31891

    Source code(tar.gz)
    Source code(zip)
Owner
Harry Fox
Co-founder & developer @Bloks-Builders, freelance web & mobile dev with @robo-fox, and floral shirt enthusiast.
Harry Fox
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.

erb ?? ?? ?? Express react boilerplate ?? ?? ?? Features Server side (Express). NoSQL database (MongoDB). Client side (React). Universal routing (reac

Huỳnh Trần Đăng Khoa 44 Nov 16, 2022
Lazerpay-react - Lazerpay SDK allows you accept payments easily in your react application

Lazerpay Official react sdk Lazerpay SDK allows you accept payments easily in yo

LazerPay 18 Nov 20, 2022
Bash-prompt-generator - Easily customize bash prompt PS1 colors, written with React

Bash prompt generator This is a web app for helping you customize the colors in

Linmiao Xu 10 Nov 27, 2022
📈 Easily interpolate to a provided value with a simple React hook.

∿ use-smooth-count ∿ Easily interpolate to a provided value with a simple React hook. npm install use-smooth-count or yarn add use-smooth-count Demo E

Conrad Crawford 31 Dec 13, 2022
My personal website. A simple, easily modifiable, fully responsive, modern, single-page application built using Typescript, React and Express.

Personal Website See: mruzunov.com. My personal website. A simple, easily modifiable, fully responsive, modern, single-page application built using Re

null 6 Dec 29, 2022
Dapp-core-components - A library that holds the core logic of a dapp on the Elrond Network with an example to get started easily

A library that holds the core logic of a dapp on the Elrond Network with an example to get started easily

Elrond Network 4 Jan 6, 2023
CLI based on Vite to generate your project easily

CLI based on Vite to generate your project easily

Phong Nguyen 6 Jul 5, 2022
This website provides users the ability to create their own memes easily

meme-generator This website provides users the ability to create their own memes easily. Features : Users can generate random meme images. Users can w

Emad Hussien 4 Oct 5, 2022
React Package Starter - a simple and slightly opinionated starter kit for developing and publishing React packages

React Package Starter This is a simple and slightly opinionated starter kit for developing and publishing React packages. It comes with a several pre-

Tim Mikeladze 22 Dec 29, 2022
Msal-react-tester - A tester package when using msal-react in your application

MSAL React Tester is a NPM package to allows you creating unit tests for any of your components that need to be authenticated (or not) using the msal-react package and Azure AD

Sébastien Pertus 14 Dec 20, 2022