Skip to content

As a developer I want to resolve react-hooks/exhaustive-deps warnings so stale closure risks are either fixed or explicitly documented #159

@ChristopherRotnes

Description

@ChristopherRotnes

Summary

Three react-hooks/exhaustive-deps ESLint warnings exist in the codebase. Each is a useEffect that intentionally omits a prop or callback from its dependency array — likely to prevent infinite re-runs on mount-only effects. The warnings are not causing bugs today, but they represent undocumented stale-closure risks. Each location should either be fixed properly (wrap callback in useCallback in the parent) or silenced with an // eslint-disable-next-line comment explaining why the omission is intentional.

Priority

Low — no current user impact; risk surfaces if callbacks change identity between renders.

Acceptance criteria

  • History.jsx:204initialDate missing from deps: fix or silence with justification comment
  • MuscleMap.jsx:165onTemplatePreloadConsumed missing from deps: fix or silence with justification comment
  • Report.jsx:98onPrefillConsumed missing from deps: fix or silence with justification comment
  • npm run lint reports 0 react-hooks/exhaustive-deps warnings after the change

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions