cellx icon indicating copy to clipboard operation
cellx copied to clipboard

"effects" in cellx

Open trusktr opened this issue 3 years ago • 0 comments

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).

trusktr avatar Aug 16 '22 18:08 trusktr