remove cx.render

This commit is contained in:
Jonathan Kelley committed 2024-01-13 21:12:21 -08:00
1 parent fae0b08e61
commit 1dde044697
159 files changed
+600 -658

No files matched your search

+10 -13
View File
@@ -11,22 +11,19 @@ fn main() {
}
fn app() -> Element {
let focused = use_state(|| false);
let focused = use_signal(|| false);
use_wry_event_handler({
to_owned![focused];
move |event, _| {
if let WryEvent::WindowEvent {
event: WindowEvent::Focused(new_focused),
..
} = event
{
focused.set(*new_focused);
}
use_wry_event_handler(move |event, _| {
if let WryEvent::WindowEvent {
event: WindowEvent::Focused(new_focused),
..
} = event
{
focused.set(*new_focused);
}
});
cx.render(rsx! {
rsx! {
div{
width: "100%",
height: "100%",
@@ -41,5 +38,5 @@ fn app() -> Element {
}
}
}
})
}
}