cellx
cellx copied to clipboard
"effects" in cellx
In Solid, it is:
createEffect(() => {
console.log(firstName() + ' ' + lastName())
})
I suppose in cellx the same is a cellx but just don't use the value:
cellx(() => {
console.log(firstName() + ' ' + lastName())
})
So "effects" and "signals" are under a single API. Personally I prefer dependency-tracking effect patterns of subcription or event patterns because the automatic dependency tracking is what leads to concise and clean code; otherwise having to manage subscriptions/events gets more verbose and less flexible, similar to always using on in Solid. (Article coming soon on how dependency tracking simplifies code compared to repeated promises, subscriptions, and events).