brackt/app/components/draft
Chris Parsons ca2fd288ab
perf: fix draft room lag from excessive re-renders and listener leaks (#54)
Primary fix: setTeamTimers now bails out with `return prev` when the
value hasn't changed, preventing a full DraftRoom re-render on every
1-second timer tick (was 33% of profiler samples).

Memoization: wrap AvailableParticipantsSection, TeamsDraftedGrid,
QueueSection, SidebarRecentPicks, and DraftGridSection in React.memo
so timer ticks don't cascade into heavy components that don't use
timer state.

Stable refs: wrap nine action handlers in useCallback and extract two
inline arrow functions from props objects so memo() comparisons
actually bail out. Memoize the { numFlexPicks } object passed to
TeamsDraftedGrid.

socketVersion: expose an incrementing counter from useDraftSocket so
the socket handler effect re-registers on socket recreation.

Async cleanup: add abort flag + in-flight guard to the visibilitychange
JWT refresh handler to prevent concurrent executions and stale state
updates after unmount. Add abort flag to useDraftNotifications
permissions.query() to prevent dangling onchange if unmounted
mid-promise.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 13:18:47 -08:00
..
AuthRecoveryOverlay.tsx fix: prevent silent logout during long-running draft sessions (#49) 2026-03-01 19:33:03 -08:00
AvailableParticipantsSection.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
ConnectionOverlay.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
DraftGridSection.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
ParticipantSelectionDialog.tsx fix: prevent iOS Safari viewport zoom on draft room form inputs (#45) 2026-02-27 23:46:09 -08:00
QueueSection.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
RecentPicksSection.tsx feat: Implement draft room redesign with collapsible sidebar and tabbed content 2025-10-25 03:23:41 -07:00
SidebarRecentPicks.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
TeamsDraftedGrid.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00