Replies: 1 comment
-
Rsx can sometimes also be valid rust code because of how similar it is to structs. For example, this expressions could be rsx: div { class: "vr" } or it could be constructing the user defined div struct: struct div {
class: &'static str
} The set of elements dioxus uses depends on what imports are present. Some renderers like freya define custom elements. The macro doesn't have any information about the context is was called in, so it could not know what those elements are |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In large components, each use of
rsx!
creates an extra layer of indentaton:Instead of using
rsx!
, is it possible to enhance the#[component]
attribute to allow using Dioxus' special syntax without having to usersx!
?This is what the same component looks like without the
rsx!
macro:I'm new to Rust (<3 months), so I don't know if you can actually do it. But if it's possible I think it would be really nice to add.
At the very least, it would be a big improvement if we didn't need the outermost
rsx!
.Beta Was this translation helpful? Give feedback.
All reactions