Improved state management

This commit is contained in:
2025-11-23 11:10:07 +01:00
parent 8740bbee89
commit b326fc48ed
2 changed files with 57 additions and 55 deletions
+3 -1
View File
@@ -34,7 +34,9 @@ fn app(cx: &Arc<Context>) -> Vec<Node> {
cx.on_event({
let count = count.clone();
move |_cx, _event: &KeyPress| {
*count.get() += 1;
#[allow(unused_mut)]
let mut count = count.get();
*count += 1;
}
});