Phoenix.LiveView.update
You're seeing just the function
update
, go back to Phoenix.LiveView module for more information.
Updates an existing key in the socket assigns.
The update function receives the current key's value and returns the updated value. Raises if the key does not exist.
Examples
iex> update(socket, :count, fn count -> count + 1 end)
iex> update(socket, :count, &(&1 + 1))