These are chat archives for pozadi/kefir

1st
May 2015
Petr Myazin
@pqr
May 01 2015 05:50
foget grunt, use webpak for everything!
Roman Pominov
@rpominov
May 01 2015 07:32
grunt is still useful as task runner, but for building itself webpak > grunt, no doubt
Stephan Hoyer
@StephanHoyer
May 01 2015 09:06
hi
I want to use kefir with mithriljs
I want to subscribe to vDOM events
normaly its a function that is called on e. G. a click event
I tried to use fromCallback which worked but only on the first event
just like the docs described
How can I achieve this?
this it what it looks like currently
    var stream = Kefir.fromCallback(function(callback) {
      scope.functionThatGetsCalledOnClick = callback;
    });
Roman Pominov
@rpominov
May 01 2015 11:51
Hi, you need Kefir.stream():
var stream = Kefir.stream(function(emitter) {
  scope.functionThatGetsCalledOnClick = emitter.emit;
  return function() {
    scope.functionThatGetsCalledOnClick = null; // or whatever you do to unsubscribe
  };
});
@StephanHoyer ^