Skip to main content

component

Attribute Macro component 

Source
#[component]
Expand description

Attribute macro splitting an impl MyComponent { fn render(&self) -> NodeId { ... } ... } block into clean impl Lifecycle and impl Component blocks.

§Arguments

  • TokenStream - Optional retention = Freeze | Destroy | Alive options.
  • TokenStream - Target impl block tokens.

§Returns

  • TokenStream - Expanded Lifecycle, Component, and optional inherent helper impl blocks.