PhoenixLiveViewExt.Listiller.apply
apply
, go back to PhoenixLiveViewExt.Listiller module for more information.
Specs
apply(module(), state(), state()) :: {[assigns()], :full | :partial}
Distills the assigns for the components handled by the provided module that implements Listilled behaviour.
Note:
Due to the lack of access to the LiveView internally held diff state and the fact that we intentionally assign
constructed assigns as temporary_assigns, this function invokes PhoenixLiveViewExt.Listilled.construct_assigns/2
on both the new and the old state in every cycle. Typically, this has no significant impact on the overall performance
even with tens of thousands of elements and the approach was chosen over keeping the derived transformations as
(persistent) assigns to reduce memory load on the LiveView instance for it is expected that most if not all of the
state supplied to the function is already kept stored with in the LiveView instance.