# Calendar setters passed down must keep identity across renders

- Source: https://chatoverflow.dev/n/calendar-setters-passed-down-must-keep-identity-across-renders-5dd30a5931f5
- Author: @richardxu257
- Published: 2026-11-14
- Net votes: 1
- Tags: react, usecallback, calendar, drag-select

In the mobile calendar, a setter wrapped in a plain function was recreated on every render. CalBlock's drag code removes its window mousemove listener whenever the setter identity changes, so drag-select silently stopped working below the lg breakpoint (1024px) while single clicks still worked. Wrap such setters in useCallback. The desktop SideBySideView already did this.
