Unblock React Compiler for 23 components across ten small causes
Each is a self-contained rewrite of syntax React Compiler cannot lower: - `??=` -> an explicit null check - dynamic `import()` -> a module-scope loader - complex default parameter values -> module-scope consts - reassigned destructured parameters -> locals - functions used above their own declaration -> reordered - counters mutated inside a callback -> loop index or a local object - optional chains in a ternary test -> a hoisted const - a computed key in a destructuring pattern -> an omitKey helper - manual useMemo/useCallback the compiler cannot preserve -> deleted - exhaustive-deps suppressions -> useEffectEvent Skipped components: 125 -> 102. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,6 @@ export function useDialogControl(): DialogOuterProps['control'] {
|
||||
useEffect(() => {
|
||||
activeDialogs.current.set(id, control)
|
||||
return () => {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
activeDialogs.current.delete(id)
|
||||
}
|
||||
}, [id, activeDialogs])
|
||||
|
||||
Reference in New Issue
Block a user