Skip to content

Commit

Permalink
Separate effect into a separate class
Browse files Browse the repository at this point in the history
Some notes about the design:
- Effects' options bag should have a `notify` method, instead of calling this `effect`. It's called with the right receiver.
- Effects can only be sinks, not sources, and this is enforced by making it banned to read effects while computing another signal
- get on Effects always returns undefined
- Effects use `Symbol.dispose` for destruction. There's no way to restart them once they have been destroyed.
- As previously, once `notify` has been called, then it won't be called again until `get` is run.
  • Loading branch information
littledan authored Oct 30, 2023
1 parent 0f6a382 commit 8e6c8f0
Showing 1 changed file with 90 additions and 75 deletions.
Loading

0 comments on commit 8e6c8f0

Please sign in to comment.