mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 14:40:44 +00:00
Fix closure signature for use_ref example in interactivity docs
The example showed the closure accepting a single argument, but it accepts none.
This commit is contained in:
parent
f6df21a34c
commit
7c2d911fbf
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ fn Child(cx: Scope, name: String) -> Element {
|
|||
|
||||
// ✅ Or, use a hashmap with use_ref
|
||||
```rust
|
||||
let ages = use_ref(&cx, |_| HashMap::new());
|
||||
let ages = use_ref(&cx, || HashMap::new());
|
||||
|
||||
names.iter().map(|name| {
|
||||
let age = ages.get(name).unwrap();
|
||||
|
|
Loading…
Reference in a new issue