Create a useMousePosition Hook with useEffect and useState in React