Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: How to construct the first parameter of a function without calling it?
AFAIK Dioxus components are type-checked normally, so it doesn't make sense that, when components are rendered thru rsx!
, they simply receive dynamic properties.
I thought maybe under the hood Dioxus converts the component's parameters into a dynamic type, but this is probably wrong (because I've seen you don't always wrap your Dioxus component into a #[component]
attribute). And if that was done, there'd be no type-checking for attributes, then.
pub enum Node<T> {
Component {
component: Rc<dyn Fn(DynParams)>,
params: DynParams,
},
}
1 post - 1 participant
🏷️ Rust_feed