Context
PR #217 added .github/workflows/pr-tests.yml which runs ESLint. The freshly installed eslint-plugin-react-hooks v7 ships new rules (notably react-hooks/refs about accessing refs during render) that flag 47 pre-existing issues. ESLint is currently configured as advisory (continue-on-error) in the CI workflow.
Affected files
Why the rule is correct
isSectionDirty() reads refs to compute its return value. Calling it inline in JSX accesses ref.current during render, which can produce stale UI when the ref changes without triggering re-render. React's docs recommend either:
- Reading the ref into a state value in useEffect, or
- Forcing a re-render via useState when the ref changes.
Effort
Each call site is a few lines. 47 sites total. Could be a single focused PR.
Acceptance
- npm run lint exits 0
- Remove continue-on-error from .github/workflows/pr-tests.yml ESLint step
Context
PR #217 added .github/workflows/pr-tests.yml which runs ESLint. The freshly installed eslint-plugin-react-hooks v7 ships new rules (notably react-hooks/refs about accessing refs during render) that flag 47 pre-existing issues. ESLint is currently configured as advisory (continue-on-error) in the CI workflow.
Affected files
Why the rule is correct
isSectionDirty() reads refs to compute its return value. Calling it inline in JSX accesses ref.current during render, which can produce stale UI when the ref changes without triggering re-render. React's docs recommend either:
Effort
Each call site is a few lines. 47 sites total. Could be a single focused PR.
Acceptance