These are chat archives for pozadi/kefir

4th
May 2015
Sergey Lapin
@lapanoid
May 04 2015 06:43
This message was deleted
Stephan Hoyer
@StephanHoyer
May 04 2015 07:28

@pozadi thought of something like

scope.functionThatGetsCalledOnClick = Kefir.callStream()

I build it for myself, but the lib it uses can’t handle functions that have other functions attached as properties… so I left the code as is without using FRP… I will consider using something like Kefir later on.

thanks for the answer though
Roman Pominov
@rpominov
May 04 2015 08:57
@izaakschroeder no, unfortunately we can't have that, see pozadi/kefir#50
@StephanHoyer you'll still need to get reference to a stream from somewhere at least, so the minimal API I can think of would look something like
var stream = Kefir.stream();
scope.functionThatGetsCalledOnClick = stream.emit;
Roman Pominov
@rpominov
May 04 2015 09:03
And it even was there until recently was deprecated pozadi/kefir#88
Also this link is relevant to both questions http://pozadi.github.io/kefir/#active-state
Having concept of activation/deactivation allows to program with FRP effectively, but also introduces some restrictions like those you're asking about.
Stephan Hoyer
@StephanHoyer
May 04 2015 09:08
I use mithril which kind-of handles the live-cycle of the DOM-binding
@pozadi :point_up: May 1 2015 1:51 PM explains well enough how I could use this with mithril. thanks again