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
I would like to print out the html that would be generated by my rsx! element. So far I've found this render_template_to_html function, but it only seems to work with static html, not dynamic components:
// Custom button component wrapper around DaisyUI's button classes//// The resulting html would be something like// `<button class="btn btn-primary" data-dioxus-id="105">Primary</button>`let preview = rsx!{Button{ color:ButtonColor::Primary,"Primary"}};// This just results in// `<!--placeholder-->`let html = dioxus_elements::render_template_to_html(&preview.as_ref().unwrap().template);
I'm suspecting I need to actually render the item to an element or something. Any ideas?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I would like to print out the html that would be generated by my rsx! element. So far I've found this render_template_to_html function, but it only seems to work with static html, not dynamic components:
I'm suspecting I need to actually render the item to an element or something. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions