Fix effect by using a set_inner

This commit is contained in:
Jonathan Kelley committed 2024-01-24 12:21:14 -08:00
1 parent 55b37cc381
commit d092f7f19f
4 files changed
+11 -2

No files matched your search

+4
View File
@@ -14,6 +14,10 @@ fn app() -> Element {
}
});
use_effect(move || {
println!("High-Five counter: {}", count());
});
rsx! {
div { "High-Five counter: {count}" }
}