Function sycamore::generic_node::dom_node::render_get_scope[][src]

pub fn render_get_scope(
    template: impl FnOnce() -> View<DomNode>,
    parent: &Node
) -> ReactiveScope
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, however, preferable to have a single call to render or render_to at the top level of your app long-term. For rendering a view that will never be unmounted from the dom, use render_to instead. For rendering under the <body> tag, use render instead.

This API requires the following crate features to be activated: dom