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

+3 -3
View File
@@ -16,7 +16,7 @@ This is moderately efficient because the fields of the map are moved, but the da
However, if you used similar approach with Dioxus:
```rust
let (map, set_map) = use_state(|| HashMap::new());
let (map, set_map) = use_signal(|| HashMap::new());
set_map({
let mut newmap = map.clone();
newmap.set(key, value);
@@ -38,9 +38,9 @@ Here's a fully-functional todo app using the use_map API:
```rust
static TodoList: Component = |cx| {
let todos = use_map(|| HashMap::new());
let input = use_ref(|| None);
let input = use_signal(|| None);
cx.render(rsx!{
rsx!{
div {
button {
"Add todo"