Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/frontend/src/hooks/useFormChangeDetection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function useFormChangeDetection<

useEffect(() => {
setTrackedInitialData(initialData);
}, [initialDataString, initialData]);
}, [initialDataString]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement: Consider adding a short comment (or an exhaustive-deps disable w/ explanation, if that rule is enabled) explaining why initialData is intentionally omitted from the deps here.

Fix: e.g. // Depend on serialized value to avoid reruns when initialData is recreated by reference (regression #1235)


const hasChanges = compareFormData(currentData, trackedInitialData);

Expand Down