#How to subscribe a signal using createEffect?
11 messages · Page 1 of 1 (latest)
createEffect(on(v1, () => {
setV2(0)
}))
You can use the on function to subscribe to certain signals
https://www.solidjs.com/docs/latest/api#on
Oh thanks..I thought this kind of approach..
That works too
Yes but i didn't like it, it's like Svelte style..
well that's why there is the on function to make it more explicit
But 'on' doesn't work if I use store like this..
() => myStore.v1