fromAll() .when({ $init:function(){ return { count: 0 } }, myEventUpdatedType: function(state, event){ state.count += 1; } }) .transformBy(function(state){ state.count = 10; }) .outputState()