Open shfshanyue opened 3 years ago
const state = { user: { id: 3 }, role: { name: 'admin' } } const proxyState = new Proxy(state, { get (target, prop) { return target[prop] }, })
//=> True state !== proxyState //=> True state.user === proxyState.user