Upward.Transformers.PhoenixLiveViewTransformer (upward v0.0.2)
View SourceAn appup transformer for Phoenix LiveView.
If this transformer is included, it will append instructions to have all Phoenix LiveView channels updated.
If you want your LiveView to be updated during an upgrade/downgrade,
you should implement code_change/3
in your LiveView.
def code_change(_old_vsn, socket, _extra) do
{:ok, socket}
end
old_vsn
will be the previous version of the Channel (not the LiveView) and {down: old_vsn}
during a downgrade.
Because the version is the version of the Channel, you should implement your own version tracking within the socket private or assigns.