MithrilJS / mithril-codemods

jscodeshift-powered mithril@0.2.x to mithril@1.x transformations
MIT License
19 stars 4 forks source link

View functions should have ctrl & options references updated #6

Closed tivac closed 8 years ago

tivac commented 8 years ago
{
    view : function(ctrl, options) {
        ctrl.fooga;
        options.wooga;
    }
}

should become

{
    view : function(vnode) {
        vnode.state.fooga;
        vnode.attrs.wooga;
    }
}

... at least I think so. There's nothing in the migration guide about it and there ought to be.