6 ms·
You didn't provide a link. I assume you were going to link the blog post announcing their switch to Mithril — that didn't contain any rationale behind it. I di
by Nemcue 11y ago
You didn't provide a link. I assume you were going to link the blog post announcing their switch to Mithril — that didn't contain any rationale behind it.
I did find this however, which goes into details about why Ember was not a good choice for them:
http://discuss.flarum.org/139-introducing-flarum-s-fast-new-front-end#p345 http://discuss.flarum.org/139-introducing-flarum-s-fast-new-...
Seems to be a well based choice. Doesn't seem to have anything to do with performance though.
While Mithril is probably a lot more extensible and easeier to work with since there's a smaller API surface, seeing "templates" like this makes me sad:
view() {
return m('div.text-editor', {config: this.element}, [
m('textarea.form-control.flexible-height', {
config: this.configTextarea.bind(this),
oninput: m.withAttr('value', this.oninput.bind(this)),
placeholder: this.props.placeholder || '',
disabled: !!this.props.disabled,
value: this.value()
}),
m('ul.text-editor-controls', listItems(this.controlItems(). toArray()))
]);
}
- empyrical 11y agoHas anyone made a JSX transformer that plays nice with Mithril? Seems like it would make using that api you provided a snippet of less painful
- k__ 11y agohttps://github.com/insin/msx https://github.com/insin/msx
- insin 11y agoYou can use Babel's JSX transformer for HTML elements by sticking this in a .babelrc file: { "jsxPragma": "m" } You'll also be able to use it for Mithril components when the next version of Mithril is released. Relevant issue: https://github.com/lhorie/mithril.js/issues/632 https://github.com/lhorie/mithril.js/issues/632
- deleted 11y ago[deleted]
- constantlm 11y agoThat "template" is really not okay.