Closed 9876691 closed 10 months ago
inline_props takes the function name, adds Props
and creates a new props struct with that name. So your app
component will have an autogenerated appProp
struct.
pub fn index(organisation_id: i32) -> String {
#[inline_props]
fn app(cx: Scope, organisation_id: i32) -> Element {
cx.render(rsx! {
div {
"{organisation_id}"
}
})
}
VirtualDom::new_with_props(app, appProps { organisation_id });
todo!()
}
I can see how to use
#[inline_props]
but not sure how to then pass this to VirtualDom for rendering (SSR).So the example below doesn't compile.