blset
July 29, 2025, 6:28pm
1
in a live component the update\2 callback
consisting of
@impl true
def update(assigns, socket) do
IO.inspect(self(), label: "UPDATE")
{:ok,
socket
|> assign(assigns)}
end
is not called and only the by default update/2 seems to be executed.
I get no trace of the inspect nor anything I do inside to modify the final assign
blset
July 29, 2025, 6:43pm
2
loos like it’s the same with 1.0.17
blset
July 31, 2025, 1:29pm
3
that was because the live component was using another module already defining the update callback
use MyMoodule
so defining
def update(assings, socket) do
...
end
in the live component using MyModule did not work and in particular did not redefined the callback
blset
August 1, 2025, 6:49am
4
the thing is that there are no error nor warning to help in finding the duplicate callback, only the second is ignored
if the duplicate was defined in the same module you’d get a warning previous clause already matches