Skip to content

Conversation

@panentheos
Copy link
Collaborator

This removes react-hook-form in favor of explicit form state management for the headway values. This library was adding a fair bit of complexity and not providing much value given our simple use case. It was also exhibiting some inconsistent behavior while trying to upgrade the package.

@panentheos panentheos requested a review from a team as a code owner December 31, 2025 18:03
Copy link
Contributor

@digitalcora digitalcora left a comment

Choose a reason for hiding this comment

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

Nice simplification of the tests, and of course I always like removing dependencies! One minor suggestion.

id="apply"
type="submit"
disabled={!isDirty || !isValid}
disabled={!isDirty || !isValid || !inEditMode}
Copy link
Contributor

Choose a reason for hiding this comment

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

I got a little tied up trying to understand this and had to go refresh myself on De Morgan's law...

!A || !B || !C == !(A && B && C)

A more natural way to describe this might be "there are three conditions, and all must be true before you can submit". Putting this into code:

const canSubmit = inEditMode && isDirty && isValid
// ...
disabled={!canSubmit}

Opinions on just the boolean transformation or extracting a variable?

@panentheos panentheos merged commit 27737a7 into master Jan 5, 2026
1 check passed
@panentheos panentheos deleted the bhw/form branch January 5, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants