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:
Maximilian von Hohenbühel 2022-06-12 16:13:47 +02:00 committed by GitHub
parent f73f68bdc5
commit 4d6329a755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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>

View File

@ -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>