DT
Size: a a a
DT
E
IE
MG
IV
DT
IV
DT
function update(old, newNestedValue) {
return {
...old,
a: {
...old.a,
b: {
old.a.b,
c: newNestedValue
}
}
}
}
function update(old, newNestedValue) {
return produce(draft => {
draft.a.b.c = newNestedValue;
return draft;
}
}
DT
IV
IV
DT
DT
IV
const a = { ...state.a }
DT
DT
IV
state.a = { ...state.a, b: false };Должно так тоже работать. Для конкретно этого теста :)
DT
DT
DT