Documentation / @zerotal/flow / index / reactive
Variable: reactive
constreactive: (value,context) =>void
Defined in: flow/src/decorators.ts:607
Marks a child-component prop as reactive — the parent re-pushes new values into it on every re-render.
Parameters
value
unknown
context
ClassFieldDecoratorContext
Returns
void
Remarks
The prop is included in the snapshot and is client-writable (so the framework can deliver the
parent's updates), and the parent re-emits it so the child re-renders when the bound value
changes. This is a one-way parent→child binding; use @modelable for two-way. Mirrors
Livewire's #[Reactive]. Applies to a field only.
Example
class PriceTag extends Component {
// Re-pushed by the parent whenever the parent's bound value changes.
@reactive amount = 0;
}