Created
June 3, 2022 19:16
-
-
Save ivanjeremic/477221564eb799c60e379674cf6da75b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const state = new Proxy(defaultState, { | |
set(target, value, reciver) { | |
switch (value) { | |
case "val": | |
document.getElementById( | |
"_6bb6g" | |
).textContent = `increment ${target.val} and ${target.val}`; | |
break; | |
case "val": | |
document.getElementById( | |
"_s75f8" | |
).textContent = `decrement ${target.val}`; | |
break; | |
default: | |
break; | |
} | |
return true; | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment