Skip to content

document how statement can be used in match arms with hml fragments #18

Description

@Madoshakalaka

I don't think this is very intuitive

#[function_component]
pub fn Foo() -> Html {
    html! {
        match true {
            true =>  <>
                let a = 1;
                let b = 2;

                    <div>{a + b}</div>
            </>,
            false =>  <div>{"false"}</div>,
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions