Hacker News new | ask | show | jobs
by fabiospampinato 1451 days ago
> I don't think it's needed here because it can be created with an `$effect`. It returns a `stop` function that can be called with `true` to dispose of all inner computations. I think I should provide a `$root` function that's just sugar for the mentioned.

Yes, but there's another ingredient missing, which is the important one: roots are not disposed of automatically when the parent computation is re-executed/disposed. That's unimplementable on top of other functions because they just don't have that property.

1 comments

You're 100% right and I realized a little after writing it. Added `$root` to the library :)