Closed justinbmeyer closed 7 years ago
Another alternative, would be to just stick on the .emmitter
. So if you wanted to emit a value:
property.emitter.value(1)
But two-way bindings work directly on the property:
property.value:bind="key"
But wouldn't work on the emitter:
property.emitter.value:bind="key"
I just realized this problem also exists with .error
. Now I'm more convinced we should just add on the emitter
.
Another wrinkle ... it can't be the actual emitter, because that might not exist yet. Yarg!
If someone uses
.emitterProperty()
to create a property with its emitter functions attached, this messes upcan-stache-key
because it reads thevalue
function (and also runs it).We have a two main options, both require breaking changes:
Rename the virtual property
Instead of
{{stream.value}}
we could call this{{stream.lastValue}}
Rename the
.value()
methodInstead of
.value()
we could call it.emit()
only. I prefer this solution because only theemitterProperties
thatcan-kefir
creates even have.value()
functions.