Found by the domain:ui execution seat while implementing objectui#6745 (the
same rule on useSchemaPersistence). Not fixed there — that PR is scoped to one
file, and widening it silently would have put four hooks' worth of timing
analysis behind one card's review.
What ESLint reports
Measured on d06059f24 (the base of objectui#6745's branch):
pnpm exec eslint packages/react --format json
=> 126 files, 0 errors, 346 warnings, of which 6 are react-hooks/refs
Three of those six were useSchemaPersistence and are gone with objectui#6745.
The remaining three, each Cannot access refs during render, are one apiece on:
packages/react/src/hooks/useETagCache.ts:204
packages/react/src/hooks/useGlobalUndo.ts:57
packages/react/src/hooks/useOffline.ts:262
Why it may matter
Same reasoning as objectui#6745: a ref read or written during render is not safe
under concurrent rendering, because a render React discards or replays still
performed the access. Whether that is reachable here depends on what each ref
holds and who reads it — that analysis has not been done for these three,
and the fix that worked for useSchemaPersistence (moving the write to
useInsertionEffect to keep the commit-phase timing) may or may not be the right
shape for them.
pnpm lint is green (0 errors), so nothing is red today, and no user-visible
break has been measured. Filing as an observation for triage, not asserting
impact.
Reproduce
pnpm exec eslint packages/react/src/hooks/useETagCache.ts packages/react/src/hooks/useGlobalUndo.ts packages/react/src/hooks/useOffline.ts --format json
Dedupe
/search/issues answers 403 for this seat, so this went through the REST list
endpoint plus a local grep: 242 open issues collected, zero hits for
useETagCache, useGlobalUndo, useOffline, react-hooks/refs or "ref during
render" other than objectui#6745 itself. Control terms hit in the same read
(objectui#6745's own title matched, and "hook" matched 2 titles), so the empty
result is a real reading rather than a broken one.
Generated by Claude Code
Found by the
domain:uiexecution seat while implementing objectui#6745 (thesame rule on
useSchemaPersistence). Not fixed there — that PR is scoped to onefile, and widening it silently would have put four hooks' worth of timing
analysis behind one card's review.
What ESLint reports
Measured on
d06059f24(the base of objectui#6745's branch):Three of those six were
useSchemaPersistenceand are gone with objectui#6745.The remaining three, each
Cannot access refs during render, are one apiece on:Why it may matter
Same reasoning as objectui#6745: a ref read or written during render is not safe
under concurrent rendering, because a render React discards or replays still
performed the access. Whether that is reachable here depends on what each ref
holds and who reads it — that analysis has not been done for these three,
and the fix that worked for
useSchemaPersistence(moving the write touseInsertionEffectto keep the commit-phase timing) may or may not be the rightshape for them.
pnpm lintis green (0 errors), so nothing is red today, and no user-visiblebreak has been measured. Filing as an observation for triage, not asserting
impact.
Reproduce
Dedupe
/search/issuesanswers 403 for this seat, so this went through the REST listendpoint plus a local grep: 242 open issues collected, zero hits for
useETagCache,useGlobalUndo,useOffline,react-hooks/refsor "ref duringrender" other than objectui#6745 itself. Control terms hit in the same read
(objectui#6745's own title matched, and "hook" matched 2 titles), so the empty
result is a real reading rather than a broken one.
Generated by Claude Code