I suggest to support fieldState.pristine property.
Why
That property would indicate whether a field has been edited as opposed to its initial state. Right now there is no way to distinguish this state, which results into people using stateful fields to track this state transitions. I would strive for field components to be stateless functional component.
Specification
The pristine property of a field's state represents whether a user has changed the field's value.
Set pristine: true in the initial field state.
Set pristine: false whenever a value change occurs.
What
I suggest to support
fieldState.pristine
property.Why
That property would indicate whether a field has been edited as opposed to its initial state. Right now there is no way to distinguish this state, which results into people using stateful fields to track this state transitions. I would strive for field components to be stateless functional component.
Specification
The
pristine
property of a field's state represents whether a user has changed the field's value.pristine: true
in the initial field state.pristine: false
whenever a value change occurs.pristine: true
on form reset.