Why is handle_info not getting called in my LiveView app?

send(self(), ...) will send the message to the iex process you’re using not necessarily the LiveView process where your handle_info callback is. Try using Process.info(self(), :messages) after you use the send command. It should show your message is in the iex mailbox.

It’s worth reading through the Phoenix PubSub docs if that’s what you’re using.

2 Likes