Monkey patch mithril so we can use JSX component syntax

<Alert foo="bar"/> instead of Alert.component({foo: 'bar'})
This commit is contained in:
Toby Zerner
2015-08-26 16:22:29 +09:30
parent 0b8aa5c124
commit df385b7df2
2 changed files with 20 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import ItemList from 'flarum/utils/ItemList';
import Alert from 'flarum/components/Alert';
import Translator from 'flarum/Translator';
import extract from 'flarum/utils/extract';
import patchMithril from 'flarum/utils/patchMithril';
/**
* The `App` class provides a container for an application, as well as various
@ -9,6 +10,8 @@ import extract from 'flarum/utils/extract';
*/
export default class App {
constructor() {
patchMithril(window);
/**
* The forum model for this application.
*