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
After the draft function is executed, if the draft tree has not really changed its values, it should return to its original state.
Although Mutative and Immer behave the same behavior, we are considering supporting new behavior, as it can reduce some unexpected shallow comparison performance due to changed states(serializes to the same string).
For example,
constbaseState={a: {b: 1}};conststate=produce(baseState,(draft)=>{deletedraft.a.b;draft.a.b=1;});expect(state).not.toBe(baseState);// They should be equal.
The text was updated successfully, but these errors were encountered:
After the draft function is executed, if the draft tree has not really changed its values, it should return to its original state.
Although Mutative and Immer behave the same behavior, we are considering supporting new behavior, as it can reduce some unexpected shallow comparison performance due to changed states(serializes to the same string).
For example,
The text was updated successfully, but these errors were encountered: