Disambiguate expressions in rsx by requiring curlies
This commit is contained in:
53 files changed
+399
-373
No files matched your search
+3
-3
@@ -37,7 +37,7 @@ const FIELDS: &[(&str, &str)] = &[
|
||||
fn app(cx: Scope) -> Element {
|
||||
cx.render(rsx! {
|
||||
div { margin_left: "30px",
|
||||
select_example(cx),
|
||||
{select_example(cx)},
|
||||
div {
|
||||
// handling inputs on divs will catch all input events below
|
||||
// so the value of our input event will be either huey, dewey, louie, or true/false (because of the checkboxe)
|
||||
@@ -114,7 +114,7 @@ fn app(cx: Scope) -> Element {
|
||||
}
|
||||
}
|
||||
|
||||
FIELDS.iter().map(|(field, value)| rsx! {
|
||||
for (field, value) in FIELDS.iter() {
|
||||
div {
|
||||
input {
|
||||
id: "{field}",
|
||||
@@ -131,7 +131,7 @@ fn app(cx: Scope) -> Element {
|
||||
}
|
||||
br {}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user