commit 309acce242674e911793fa58cb49f973e397b9d0 Author: Matthew Huntington Date: Sat Feb 1 18:39:23 2025 -0500 basic state diff --git a/index.js b/index.js new file mode 100644 index 0000000..9141146 --- /dev/null +++ b/index.js @@ -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);