In the code above effect's dependencies are being added but not really used anywhere except for cleaning itself
That is why. Each Effect needs to unsubscribe itself on cleanup/re-run. We need to know since the Signal holds the subscriptions. A long lived Signal could fire an Effect indefinitely otherwise long after it should be disposed.
Solid has proxies but the prefered pattern is createStore which creates a readonly proxy and setter function combo. There is a createMutable like MobX/Vue available though.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Discussion on: Building a Reactive Library from Scratch
Replies for: Hi Ryan, Thanks for this post ! Why should the Effect itself hold a list of dependencies as well. The Signal holds a list of subscriptions that s...
For further actions, you may consider blocking this person and/or reporting abuse