Closed ctron closed 1 year ago
It looks like a possible workaround is to use:
#[function_component(Example)]
fn example() -> Html {
let some_switch = false;
html!(
<Foo>
<Bar/>
{ if some_switch {
Some(html_nested!(<Bar/>))
} else { None } }
<Bar/>
</Foo>
)
}
The issue is discussed more in depth in #3256. Please continue the discussion there
Problem
When using
ChildrenRenderer<T>
(instead ofChildren
), then the conditionalif
doesn't seem to work.Steps To Reproduce
Expected behavior
I would expect this to work the same way as with
Children
.Environment:
0.20.0
1.67.1
wasm32-unknown-unknown
trunk
Questionnaire