milomg / reactively

MIT License
415 stars 23 forks source link

How to dispose an effect? #19

Closed EisenbergEffect closed 11 months ago

EisenbergEffect commented 11 months ago

Is there an API that one should call when an effect should be disposed? Or is there a way to turn an effect on/off?

milomg commented 11 months ago

Turning off an effect would be relatively easy: set node.effect = false. Cleaning up an effect (and nested effects/computations) is currently out of scope for reactively.