Refactor Mutations and simplify Templates (#578)

* update mutations to be path based rather than renderer integrated
This commit is contained in:
Demonthos authored and GitHub committed 2022-10-18 14:42:45 -07:00
1 parent 020c4bf0f8
commit 3b7b503333
44 files changed
+2643 -3134

No files matched your search

+3 -1
View File
@@ -1,3 +1,4 @@
use dioxus::core_macro::rsx_without_templates;
use dioxus::prelude::*;
use dioxus_tui::query::Query;
use dioxus_tui::Size;
@@ -10,7 +11,8 @@ fn app(cx: Scope) -> Element {
let hue = use_state(&cx, || 0.0);
let brightness = use_state(&cx, || 0.0);
let tui_query: Query = cx.consume_context().unwrap();
cx.render(rsx! {
// disable templates so that every node has an id and can be queried
cx.render(rsx_without_templates! {
div{
width: "100%",
background_color: "hsl({hue}, 70%, {brightness}%)",
+2 -1
View File
@@ -1,9 +1,10 @@
#![allow(non_snake_case)]
use dioxus::prelude::*;
use dioxus_tui::Config;
fn main() {
dioxus_tui::launch(app);
dioxus_tui::launch_cfg(app, Config::default());
}
#[derive(Props, PartialEq)]