Closed derrickreimer closed 5 months ago
This is needed for #6, so that we can conditionally compute props only if they are needed.
We should accept functions for prop values in both modes for prop-setting: assign_prop and the props argument on render_inertia.
assign_prop
render_inertia
conn |> assign_prop(:users, fn -> User.list() end) |> render_inertia("Page", %{expensive thing: fn -> calculate() end})
This is needed for #6, so that we can conditionally compute props only if they are needed.
We should accept functions for prop values in both modes for prop-setting:
assign_prop
and the props argument onrender_inertia
.