Skip to content

fix: resolve 5 React lint errors#3

Merged
nocoo merged 1 commit intomainfrom
fix/lint-errors
Apr 22, 2026
Merged

fix: resolve 5 React lint errors#3
nocoo merged 1 commit intomainfrom
fix/lint-errors

Conversation

@nocoo
Copy link
Copy Markdown
Owner

@nocoo nocoo commented Apr 21, 2026

Fix 5 React hooks lint errors across 3 files:

  • use-streaming-predict.ts: wrap ref updates in useEffect (react-hooks/refs)
  • settings-panel.tsx: restructure loadModels to avoid set-state-in-effect
  • use-settings.tsx: defer synchronous setState in callbacks (set-state-in-effect)

Verified: bun run lint → 0 errors, 0 warnings.

- use-streaming-predict.ts: wrap ref updates in useEffect (react-hooks/refs)
- settings-panel.tsx: replace direct setState in effects with .then() chains
  and queueMicrotask; use refreshKey pattern for manual reload button
- use-settings.tsx: inline initial fetch using .then() chain in useEffect;
  defer setState in callbacks with await Promise.resolve()
@nocoo nocoo merged commit 387a038 into main Apr 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant