@threadplane/renderFunctionv0.3.4

injectRenderHost

Obtain the element-scoped RenderHost from inside a mounted view component — use it to write state, emit events, or announce a result back to the render engine.

import { injectRenderHost } from '@threadplane/render';

Declaration · overload 1

export declare function injectRenderHost(): RenderHost;

Returns

RenderHost

Examples

\@Component({ ... })
class ApproveButton {
  private host = injectRenderHost();
  approve() { this.host.result('approved'); }
}