state

Attribute Macro state 

Source
#[state]
Expand description

Attribute macro for marking component state.

State fields are reactive - changes trigger re-renders.

§Example

#[derive(Component)]
struct Counter {
    #[state]
    count: i32,  // Changes to count trigger re-render
}