Skip to main content

component

Attribute Macro component 

Source
#[component]
Expand description

The component attribute macro for marking component functions.

This is a pass-through attribute macro that does not modify the item. It serves as a marker to indicate that the annotated function is a UI component that returns a VirtualNode.

§Arguments

  • TokenStream - The attribute arguments (unused).
  • TokenStream - The item being annotated (passed through unchanged).

§Returns

  • TokenStream - The original item unchanged.