-
const defaults = { foo: 'bar' }
const state = proxy(deepClone(defaults))
delete state.foo
console.log(state.foo) // I want it change to `'bar'`, not `undefined` |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Dec 14, 2024
Replies: 1 comment 4 replies
-
Something like this? Object.assign(state, deepClone(defaults)); The idea of const defaults = { foo: 'bar' }
const state = deepClone(defaults)
delete state.foo
console.log(state.foo) // I want it change to `'bar'`, not `undefined` |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not strongly suggesting it, but "sync" subscribe might help this specific case.