我正在尝试 Polythene但似乎所有文档都是针对旧版本的 Mithril 。我不知道如何在当前版本的 Mithril 中使用这个库。
以下是我得到的一些基本代码,显然可以与 Mithril 0.2 配合使用:
import m from "mithril";
import button from "polythene/button/button";
var app = {
view: function() {
return m("div", [
m.component(button, {
label: "Hello",
raised: true
})
]);
}
}
m.mount(document.body, app);
对于当前的 Mithril 1.1,这将如何编写?
最佳答案
这是针对特定库的支持请求,因此您可能应该查看存储库。
这里有一个与 Mithril 1 版本相关的未决问题:https://github.com/ArthurClemens/polythene/issues/38 罢工>
Polythene has reached version 1 and now supports Mithril v1!
关于javascript - 如何将聚乙烯与 Mithril 1.1 一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43220864/