Isn't the difference between signals and observables that signals are subscribed to while reading and that signals are based on pulling updates while observables are based on pushing updates?
In fact, your implementation is even compatible with Svelte's store contract for observables.
Yes, I think you are right,
I was trying to see if I can make something that used a mix.
Essentially, everything gets wrapped with `{current: ..}`
That way if you reassign `something.current = null`, it can propagate the change (wheres `something = null` is a re-assignment)
This would require static analysis, meaning subscriptions and assignments would only be reactive within the scope of the variable creation
Basically the same limitations as Svelte 3
Correct, personally I never needed reactivity outside components, maybe I just haven't tried it..
But I wanted to build something where I can see the tradeoffs in implementation for myself
Comments
In fact, your implementation is even compatible with Svelte's store contract for observables.
I was trying to see if I can make something that used a mix.
Essentially, everything gets wrapped with `{current: ..}`
That way if you reassign `something.current = null`, it can propagate the change (wheres `something = null` is a re-assignment)
Basically the same limitations as Svelte 3
But I wanted to build something where I can see the tradeoffs in implementation for myself
https://gist.github.com/joshnuss/60f376be1bd05797409975760c7fca02