Update 05_forms.md (#172)

Added a missing mention of calling the set() function.
This commit is contained in:
Sergey Reshetnikov
2025-05-09 20:23:15 +03:00
committed by GitHub
parent cfa474aaec
commit 3108235f29

View File

@@ -192,7 +192,7 @@ let on_submit = move |ev: SubmitEvent| {
};
```
Our `on_submit` handler will access the inputs value and use it to call `set_name`.
Our `on_submit` handler will access the inputs value and use it to call `set_name.set()`.
To access the DOM node stored in the `NodeRef`, we can simply call it as a function
(or using `.get()`). This will return `Option<leptos::HtmlElement<html::Input>>`, but we
know that the element has already been mounted (how else did you fire this event!), so