You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're using conditional rendering in the rsx! macro, the shorthand notation breaks the rsx! macro.
Steps To Reproduce
let class = " ";let onclick = move |event:MouseEvent| {};rsx!(
div {
class: ifletSome(dark) = light_state.read().is_on(){"{dark}"},
class,
onclick,
Router::<Route> {}})
This does not compile and make the rsx! macro panics with error: proc macro panicked = help: message: expected an expression.
If you use the full notation it works though, but dx fmt with the last version of the CLI will force the swap to the shorthand one.
Expected behavior
For the macro not to panic ?
For dx fmt not to force the shorthand notation maybe, or as an option in the command and/or dioxus.toml ?
Problem
If you're using conditional rendering in the rsx! macro, the shorthand notation breaks the rsx! macro.
Steps To Reproduce
This does not compile and make the rsx! macro panics with
error: proc macro panicked = help: message: expected an expression
.If you use the full notation it works though, but dx fmt with the last version of the CLI will force the swap to the shorthand one.
Expected behavior
Environment:
Questionnaire
The text was updated successfully, but these errors were encountered: