WASM 中 Rust 的React式 DOM 库

时间:2021-06-28 18:45:59
【文件属性】:
文件名称:WASM 中 Rust 的React式 DOM 库
文件大小:134KB
文件格式:ZIP
更新时间:2021-06-28 18:45:59
html rust gui reactive web 枫具有细粒度React性的无 VDOM 网络库。入门推荐的构建工具是Trunk 。首先将maple-core添加到Cargo.toml :maple-core =" 0.1.1"将以下内容添加到您的src/main.rs文件中:use maple_core:: prelude::* ;fnmain () {let root=template! { p { #"Hello World!" } };render (root); }就是这样!有使用maple hello world 程序。要运行该应用程序,只需运行trunk serve --open并在您的 Web 浏览器中查看结果。template!宏maple使用template!宏作为一种符合人体工程学的方式来创建复杂的用户界面。// You can create nested elements.template! { div { p { span { #"Hello "

网友评论