I just made a change that should make working with mutators a bit more consistent. This work originated from a bug that @rjclardy and I were tracking down in an application. Here's the story.
We had some code that invoked a mutator and subscribed the view to future state changes:
view.scope(:foo).mutated(:list, with: data(:foo).all).subscribe
The problem was the view wasn't being subscribed; in fact, the
data-channel wasn't even being set.
It turns out that the return value of the
list mutator wasn't the view that we were mutating. This means that
subscribe wasn't being called in context of some other return value rather than the mutated view. After some discussion we decided that this was confusing behavior.
Pakyow will now always call
subscribe on the mutated view regardless of the return value from the mutator. Hopefully this will save someone from needing to figure out why their auto-updates aren't working