Track Variable Changes

i quite don't remember a lot the splid js syntax can someone explain to me how can i track variable changes and based on that i execute a function
8 Replies
McBrincie212
McBrincie212OP2y ago
actually
lxsmnsyc
lxsmnsyc2y ago
like react to when variables change or just track them passively
McBrincie212
McBrincie212OP2y ago
i want to track the scroll position difference like if i scroll i want to note that ok
Ping for toast
const [n,setN] = createSignal(0)
const n2 = () => n() * n()
setN(30)
const [n,setN] = createSignal(0)
const n2 = () => n() * n()
setN(30)
?
lxsmnsyc
lxsmnsyc2y ago
that's a question btw
McBrincie212
McBrincie212OP2y ago
hmmmmmm k but i kinda referenced my question a bit wrong this is what im trying to do
Ping for toast
GitHub
solid-primitives/packages/scroll at main · solidjs-community/solid-...
A library of high-quality primitives that extend SolidJS reactivity. - solid-primitives/packages/scroll at main · solidjs-community/solid-primitives
McBrincie212
McBrincie212OP2y ago
hmm ok
Want results from more Discord servers?
Add your server