Function sycamore::hydrate_in_scope
pub fn hydrate_in_scope(view: impl FnOnce() -> View<HydrateNode>, parent: &Node)
Expand description
Render a View
under a parent
node, in a way that can be cleaned up.
This function is intended to be used for injecting an ephemeral sycamore view into a
non-sycamore app (for example, a file upload modal where you want to cancel the upload if the
modal is closed).
It is expected that this function will be called inside a reactive root, usually created using
create_root
.
This API requires the following crate features to be activated: hydrate
, dom