LiveView - Live Component - send_update with socket as argument

Hi!

Suggest to add the ability to do use the components socket as input into Phoenix.LiveView.send_update/3 function to make it easier to send an update to self.

Using @myself as an argument is good, but think it would be easier to grasp when just using the current socket.
I think the cid is present in the socket and the module can be fetched using __MODULE__ is guess? :slight_smile:

Example:

@impl true
def update(%{title: title}, socket) do
  updated_socket = socket
  |> assign(:title, title)

  {:ok, updated_socket}
end

@impl true
def handle_event("update_title", %{"title" => title} = _params, socket) do
  updated_socket = socket
  |> send_update(title: title)

  {:noreply, updated_socket}
end