View Source LiveVue.SSR behaviour (LiveVue v0.3.5)

A behaviour for rendering Vue components server-side.

To define a custom renderer, change the application config in config.exs:

config :live_vue, ssr_module: MyCustomSSRModule

Exposes a telemetry span for each render under key [:live_vue, :ssr]

Summary

Types

A render response which should have shape

Types

@type component_name() :: String.t()
@type props() :: %{optional(String.t() | atom()) => any()}
@type render_response() :: %{optional(String.t() | atom()) => any()}

A render response which should have shape

%{ html: string, preloadLinks: string }

@type slots() :: %{optional(String.t() | atom()) => any()}

Callbacks

Link to this callback

render(component_name, props, slots)

View Source
@callback render(component_name(), props(), slots()) :: render_response() | no_return()

Functions

Link to this function

render(name, props, slots)

View Source
@spec render(component_name(), props(), slots()) :: render_response() | no_return()