Method decorator: marks a method as the component's renderer.
The aash-component Alpine directive looks up the decorated method via the class's prototype and invokes it. This replaces the previous convention of hard-coding the method name "render".
aash-component
Example:
class MyElement extends HTMLElement { @Renderer() protected renderComponent() { Alpine.addScopeToNode(this, this.ajsData as unknown as Record<string, unknown>); this.innerHTML = `<span>...</span>`; }} Copy
class MyElement extends HTMLElement { @Renderer() protected renderComponent() { Alpine.addScopeToNode(this, this.ajsData as unknown as Record<string, unknown>); this.innerHTML = `<span>...</span>`; }}
Method decorator: marks a method as the component's renderer.
The
aash-componentAlpine directive looks up the decorated method via the class's prototype and invokes it. This replaces the previous convention of hard-coding the method name "render".Example: