Update 06_control_flow.md (#188)

value.get() instead of value()
This commit is contained in:
ryykdev
2025-04-18 16:25:59 +02:00
committed by GitHub
parent acdf261749
commit 11fe9f22b9

View File

@@ -253,11 +253,11 @@ Heres the same example, with the conversion added:
view! {
<main>
{move || match is_odd() {
true if value() == 1 => {
true if value.get() == 1 => {
// returns HtmlElement<Pre>
view! { <pre>"One"</pre> }.into_any()
},
false if value() == 2 => {
false if value.get() == 2 => {
// returns HtmlElement<P>
view! { <p>"Two"</p> }.into_any()
}