basic state

main
Matthew Huntington 11 months ago
commit 309acce242

@ -0,0 +1,15 @@
const state = new Proxy(
{
fun:true
},
{
set: (target, prop, value) => {
console.log(`Property ${prop} changed from ${target[prop]} to ${value}`);
target[prop] = value
}
}
)
console.log(state);
state.fun = false
console.log(state);
Loading…
Cancel
Save