6 Matching Annotations
- Oct 2020
Mine requires that dirty and pristine be "calculated properties".
This is a philosophical issue, I think. People (and presumably form libraries) have different definitions of what "dirty" means. Yours: "The field has ever been edited" Mine: "The value of the field is different from the initial value"
Personally, I rather like the idea of typing into a field, backspacing to undo what you just typed, and having the field (and form) go back to being pristine. Aside from that aesthetic difference, my definition has the practical implication that it lets you know if you need to save the record or not.
We could potentially have another flag that was your definition of dirty, but then we run into the hard problem in computer science: naming things.
- different definitions
- naming things is hard
- forms: dirty state
- calculated property
- good definition is important
- different way of thinking about something
- react-final-form: mutator