MithrilJS / mithril-codemods

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

Support m.module and use oncreate instead of oninit #5

Closed porsager closed 8 years ago

porsager commented 8 years ago

In the case of 0.x, "config" always has the dom element available. The correct lifecycle hook to replace !init if blocks would most likely be oncreate since oninit doesn't have the dom element available yet.

tivac commented 8 years ago

Where did m.module come from? I see it in next but don't think I've ever heard of it before.

tivac commented 8 years ago

:+1: thanks!

porsager commented 8 years ago

I think it was a leftover from 0.1.x. I just stumbled on it in one of my projects I tested on 😋