mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Update introduction.mdx (#2730)
* Update introduction.mdx The `if else` example was syntactically correct, but had a semantic issue of not using the condition variable. Could lead to confusion if you are a newbie. * Update conditional-rendering.mdx changed if condition variable in html docs
This commit is contained in:
parent
f73f68bdc5
commit
4d6329a755
@ -31,7 +31,7 @@ use yew::prelude::*;
|
||||
let some_condition = true;
|
||||
|
||||
html! {
|
||||
if false {
|
||||
if some_condition {
|
||||
<p>{ "True case" }</p>
|
||||
} else {
|
||||
<p>{ "False case" }</p>
|
||||
|
||||
@ -189,7 +189,7 @@ use yew::html;
|
||||
let some_condition = true;
|
||||
|
||||
html! {
|
||||
if false {
|
||||
if some_condition {
|
||||
<p>{ "True case" }</p>
|
||||
} else {
|
||||
<p>{ "False case" }</p>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user