You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
const state = new Proxy(
|
|
{
|
|
fun: { awesome:true }
|
|
},
|
|
{
|
|
set: (target, prop, value) => {
|
|
console.log(`Property ${prop} changed from ${target[prop]} to ${value}`);
|
|
target[prop] = value
|
|
}
|
|
}
|
|
)
|
|
|
|
console.log(state);
|
|
state.fun.awesome = false
|
|
console.log(state);
|