Macro for defining render functions in Lavash LiveViews and Components.
This macro captures render fn assigns -> ~L"""...""" end definitions and stores
them in a module attribute for later processing by the compiler.
Usage
render fn assigns ->
~L"""
<div>{@count}</div>
"""
endThe function receives assigns and must return HEEx content via the ~L sigil.
Summary
Functions
Defines a render function.
Defines a loading render function for overlays (modals, flyovers).
Functions
Defines a render function.
The function receives assigns and should return HEEx content via ~L sigil.
Examples
render fn assigns ->
~L"""
<div>
<span>{@count}</span>
<button phx-click="increment">+</button>
</div>
"""
end
Defines a loading render function for overlays (modals, flyovers).
Examples
render_loading fn assigns ->
~L"""
<div class="animate-pulse">Loading...</div>
"""
end