Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
NNordes Ménard-Lamarre
Last edited Sep 6, 2021
Created on Sep 6, 2021

A circle tracks the mouse cursor across an SVG canvas, reacting instantly to movement. The visualization demonstrates state management in React, using the `useState` hook to store cursor coordinates and `useCallback` to optimize the mouse-move handler. The SVG circle updates its `cx` and `cy` attributes based on those coordinates, rendered via ReactDOM. The example uses D3.js v7 only for its bundled build, while the core interaction is purely React-driven.

AI-generated description

A program that follow your mouse.

MIT Licensed

Similar vizzes