RenderResult
The output of {@see \Milpa\Live\Contracts\Rendering\ComponentRendererInterface::render()}. `$state` MUST be populated whenever the renderer mounted the component itself (see {@see RenderRequest::$state}), so callers that need to persist or re-encode the resulting state do not have to re-mount to get it.
RenderResult::__construct()
public function __construct(string $output, ?Milpa\Live\ValueObjects\StateSnapshot $state = null, array $assets = [], array $effects = [], Milpa\Live\ValueObjects\RenderTarget $format = Milpa\Live\ValueObjects\RenderTarget::HTML):Parameters
| Name | Type | Description |
|---|---|---|
| $output | string | The rendered output — HTML markup, or a TUI text block, per `$format`. |
| $state | (StateSnapshot | null) | The state that was rendered, populated whenever the renderer mounted or otherwise resolved one. |
| $assets | array<string, mixed> | Target-specific client assets/metadata (e.g. `'script'` URL, TUI key hints). |
| $effects | array<int, array<string, mixed>> | Side effects the caller should apply alongside the output. |
| $format | RenderTarget | Which target this output was rendered for. |