Dead code: unused useForceUpdate.js #87

Closed
opened 2026-09-12 01:51:35 -04:00 by jared · 0 comments
Owner

Severity: low · Type: tech-debt · Confidence: high

Location: src/app/hooks/useForceUpdate.js

Problem

Two implementations of useForceUpdate exist side-by-side: .js (uses useState with object mutation) and .ts (uses useReducer with counter). Only the .ts version is imported by actual code (useStateEvent.ts, useRoomMemberChange.ts, CryptoDiagnostics.tsx). The .js file is never imported and serves no purpose.

How to trigger

Searching imports of useForceUpdate finds only .ts usage.

Suggested fix

Remove src/app/hooks/useForceUpdate.js. The .ts version is the current, correct implementation.


Filed from the September 2026 client audit (branch lotus @ 4bea4895).

**Severity:** low · **Type:** tech-debt · **Confidence:** high **Location:** `src/app/hooks/useForceUpdate.js` ### Problem Two implementations of `useForceUpdate` exist side-by-side: `.js` (uses `useState` with object mutation) and `.ts` (uses `useReducer` with counter). Only the `.ts` version is imported by actual code (`useStateEvent.ts`, `useRoomMemberChange.ts`, `CryptoDiagnostics.tsx`). The `.js` file is never imported and serves no purpose. ### How to trigger Searching imports of `useForceUpdate` finds only `.ts` usage. ### Suggested fix Remove `src/app/hooks/useForceUpdate.js`. The `.ts` version is the current, correct implementation. --- _Filed from the September 2026 client audit (branch `lotus` @ 4bea4895)._
jared added this to the Audit 2026-09 · Medium & Low milestone 2026-09-12 01:51:35 -04:00
jared added the priority: lowtech-debtarea: build-ci labels 2026-09-12 01:51:35 -04:00
jared self-assigned this 2026-09-12 01:51:35 -04:00
jared closed this issue 2026-09-13 00:56:42 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#87