I love useRef, but it lacks the lazy initializer functionality found in other hooks (useState / useReducer / useMemo). useRef({ x: 0, y: 0 }) creates an object { x: 0, y: 0 } on every render, but only uses it when mounting — it subsequent renders it's thrown away. With useState, we can replace the initial value with an initializer that's only called on first render — useState(() => ({ x: 0, y: 0 })) (I've explored this and other useState features in my older post). Creating functions is v...