I've spent the last couple of days familiarizing myself with Mithril, only to encounter m.prop
in some Flarum code today and realizing Flarum uses Mithril v0.2.8. Mithril is at v2.0.4 today and it raised some questions.
First of all, are there still plans for Flarum to catch up?
But more interestingly, I'm curious to ask how you lovely people at Flarum would go about doing this, as Mithril 2 is not backwards compatible and all of those Flarum extensions out there have some front-end code using old Mithril methods?
They did provide some tools to help migrating. From Migrating from v0.2.x:
v1.x and v2.x are largely API-compatible with v0.2.x, but there are some breaking changes. Migrating to v2.x is nearly identical, so the notes below apply mostly to both.
If you are migrating, consider using the mithril-codemods tool to help automate the most straightforward migrations.
But even then:
There are certain classes of changes that are impossible to automatically convert.
m.prop removed
m.redraw(true) removed
m.deferred() removed
onunload preventing unmounting
I'm just starting Flarum development, is it wise to try and avoid certain practices to futureproof my extension when it comes to Mithril?