Just playing around. User interactions are unsupported. The aim is just to make it render.
Here's the code: YUCLing/flarum-frameworktree/attempt/mithril-v3
It's a mess. Since I just want to make it work.
It's based on Flarum 2.0. And used tons of hacks, mainly located in patchMithril.js
. It seems that it's possible to keep object component in Mithril v3, but hacks are required. Also I'm not sure about the performance impact.
To build it, you need to make sure submodules are updated, and go to js-packages/mithril
, run npm run build
. Then run yarn
and yarn build
in framework/core/js
.
If you want to make Flarum runs on Mithril v3 properly, you will have to rewrite tons of components. The lifecycle is one of the major issue even you can make object components work. The lifecycle is currently solved right now I think, except for onbeforeremove
, this one can be tricky.