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 src/alt-model/form_fields_hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function useTrackedFieldChangeHandlers<TFields extends {}>(
// Initialising to a ref instead of memoising is safe on the assumptions that:
// - fieldsSetter is a stable react state hook rather than some arrow function with captures
// - The keys of `fields` all start with a defined value.
// Using a ref is desirable becuase it stablises the setters for use in effect hooks
// Using a ref is desirable because it stablises the setters for use in effect hooks
const fieldSettersRef = useRef<FieldSetters<TFields>>();
if (!fieldSettersRef.current) {
fieldSettersRef.current = mapObj(fields, (_, name) => (value: typeof _) => {
Expand Down