You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have isModified helper, much like isDraft or current functions.
Motivation
More efficient updates of derived data in draft. Immer currently do have all necessary information, in it's essence it is stripped down version of current.
Can this be solved in user-land code?
It can be solved in following ways:
You can compare current with original in draft - but that's unnecessarily expensive for simple yes/no query
You can finishDraft, compare with original, then createDraft again if necessary
🚀 Feature Proposal
It would be great to have
isModified
helper, much likeisDraft
orcurrent
functions.Motivation
More efficient updates of derived data in draft. Immer currently do have all necessary information, in it's essence it is stripped down version of
current
.Can this be solved in user-land code?
It can be solved in following ways:
current
withoriginal
in draft - but that's unnecessarily expensive for simple yes/no queryfinishDraft
, compare with original, thencreateDraft
again if necessaryExample
The text was updated successfully, but these errors were encountered: