Skip to content

struct

Instance

pub struct Instance {
    /* private fields */
}

A mounted component: its props, scope, owned effects and child instances.

Methods

new

pub fn new(component: Component, props: BTreeMap<String, Value>) -> Rc<Instance>

Run the component's setup (untracked, owning any effects it creates).

render

pub fn render(&self, registry: &Registry) -> Result<Vec<VNode>, RenderError>

Render the instance's template with its scope, resolving components in registry.

child_count

pub fn child_count(&self) -> usize

Number of live nested component instances.

unresolved_references

pub fn unresolved_references(&self) -> Vec<String>

Names the template references that setup didn't bind.

dispose

pub fn dispose(&self)

Dispose this instance's effects and drop its children.

Trait implementations