readme.rs 417 B

12345678910111213141516171819202122
  1. use dioxus::prelude::*;
  2. fn main() {
  3. let mut dom = VirtualDom::new(app);
  4. dom.rebuild();
  5. rink::render_vdom(&dom).unwrap();
  6. }
  7. fn app(cx: Scope) -> Element {
  8. cx.render(rsx! {
  9. div {
  10. width: "100%",
  11. height: "10px",
  12. background_color: "red",
  13. justify_content: "center",
  14. align_items: "center",
  15. "Hello world!"
  16. }
  17. })
  18. }