E14 Mouse Follower
A yellow circle follows the mouse cursor across an SVG canvas, moving smoothly as the pointer travels. The example demonstrates interaction with React by using the `useState` hook to store the mouse's x and y coordinates, updating them via the `onMouseMove` event. The `useCallback` hook memoizes the event listener to optimize performance, while `ReactDOM.render` mounts the component. The circle's position is bound directly to the state, leveraging unidirectional data flow to keep the visualization in sync with user input.
AI-generated descriptionFollows your mouse with a circle
Datavis 2020 Episode 14 - Interaction With React https://www.youtube.com/watch?v=9zzIwsASgeo
Uses unidirectional data flow (the useState hook), and memoization of event listeners (the useCallback hook).