Conditional rendering
If blocks
To conditionally render some markup, we wrap it in an if
block:
- if
- if - else
- if let
- if let else
use yew::prelude::*;
html! {
if true {
<p>{ "True case" }</p>
}
};
To conditionally render some markup, we wrap it in an if
block:
use yew::prelude::*;
html! {
if true {
<p>{ "True case" }</p>
}
};