docs: move into a fromjs tutorial
This commit is contained in:
1 parent
b05331a60b
commit
69f5cc3802
10 files changed
+92
-113
No files matched your search
@@ -20,7 +20,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(ctx, || HashMap::new());
|
||||
let (map, set_map) = use_state(&ctx, || HashMap::new());
|
||||
set_map({
|
||||
let mut newmap = map.clone();
|
||||
newmap.set(key, value);
|
||||
|
||||
Reference in new issue
Block a user