I know that there are Lifecycles in Mithril. Such as onupdate, oninit, oncreate, etc. I was hoping I could do something simplistic like this:
extend(PostStream.prototype, 'view', function(vnode) {
[code goes here]
}
});
This works (there's obviously other code I'm not showing but this does work). I can inject something into the PostStream. But, once I try to add "onupdate" it breaks. I'm either adding it in the wrong spot, or you can't do it this way.
Anyone got some hints? For example, this of course doesn't work:
extend(PostStream.prototype, 'onupdate', 'view', function(vnode) {
[code goes here]
}
});