pub fn component<C>(&self, props: C::Props) -> &Self
    where
        C: Component<G>,
    {
        self.child(instantiate_component::<G, C>(props));

        self
    }
/// Renders a component as a child.
///
/// # Example
/// ```
/// use sycamore::prelude::*;
/// # use sycamore::builder::html::*;
/// #[component(MyComponent<G>)]
/// fn my_component() -> View<G> {
///     h1().text("My component").build()
/// }
///
/// # fn _test<G: Html>() -> View<G> {
/// div().component::<MyComponent<_>>(()).build()
/// }
/// ```
Renders a component as a child.
Renders a component as a child .
pub fn component<C>(&self, props: C::Props) -> &Self
    where
        C: Component<G>,
    {
        self.child(instantiate_component::<G, C>(props));
        self
    }
pub fn component < C > ( & self , props : C :: Props ) -> & Self where C : Component < G > , { self . child ( instantiate_component :: < G , C > ( props ) ) ; self }
Renders a component as a child.
Renders a component as a child .
&self
props
C::Props
example
```
use sycamore::prelude::*.
` ` ` use sycamore :: prelude :: * .
use sycamore::builder::html::*;
None
[component(mycomponent<g>)]
fn my_component() -> View {
h1().text("My component").build()
}
fn my_component () - > View { h1 () . text ( " My component " ) . build () }
fn _test<g: html>() -> view<g> {
None