mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-30 08:00:21 +00:00
Merge pull request #252 from autarch/autarch/fix-use_ref-doc-example
Fix closure signature for use_ref example in interactivity docs
This commit is contained in:
commit
d2fbebf853
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
|
// ✅ Or, use a hashmap with use_ref
|
||||||
```rust
|
```rust
|
||||||
let ages = use_ref(&cx, |_| HashMap::new());
|
let ages = use_ref(&cx, || HashMap::new());
|
||||||
|
|
||||||
names.iter().map(|name| {
|
names.iter().map(|name| {
|
||||||
let age = ages.get(name).unwrap();
|
let age = ages.get(name).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue