update/3 in the LiveView module updates the socket’s assigns (similar to Map.update!/3).
update/2 callback in LiveComponent module is invoked as part of the component’s lifecycle (if defined) and is also invoked (if defined) by send_update/3.
send_update/3 in the LiveView module updates a mounted component by invoking update/2.
Somebody new to the framework might get confused and have to remember which update is which.
A quick fix might be renaming the update/3 function to something like update_assign/3 if this is a real problem for newcomers.
I would like to know what other users of LiveView think.
Good points about the naming principles. I shouldn’t have provided an example.
Maybe the right approach to the thinking is:
update/2 and update/3 have very different functionality but have the same name when using LiveComponent. I know I was able to explain it but for a newcomer this can be I believe confusing.