Documentation / @zerotal/flow / index / renderless
Function: renderless()
renderless(
_fn,context):void
Defined in: flow/src/decorators.ts:666
Marks an action method as renderless — the action runs on the server but the follow-up re-render is skipped.
Parameters
_fn
unknown
context
ClassMethodDecoratorContext
Returns
void
Remarks
Unlike @task, @renderless does NOT imply @expose — it only registers the method as
renderless, so it must be combined with @expose (or another decorator that exposes it) to be
callable from the client. Use it for side-effect-only actions whose result the UI does not need
to reflect (logging, fire-and-forget writes), avoiding the cost of a re-render and patch.
Applies to a method only.
Example
class Analytics extends Component {
@expose @renderless track(event: string) {
this.logger.record(event); // no DOM update needed
}
}