LiveViewNative.Extensions.Templates (live_view_native v0.0.4)

LiveView Native extension for rendering platform-specific templates. Takes the following parameters which are typically derived from a Macro.Env struct:

  • template_basename - base filename of the template
  • template_directory - root path of the template
  • template_extension - file extension of the template
  • template_engine (optional) - a module implementation of Phoenix.Template.Engine to use for rendering the template. Defaults to Phoenix.LiveView.HTMLEngine

If a template file and engine exist for the given parameters, a render/1 function is generated which renders the template using that template engine.