Re-render on the Live mount

Hello guys!

I’m working with Phoenix.LiveView and I’m doing a post inside the mount of the Live. This post in sending a map but I don’t wait for a response, just send it, but the mount is re-rendering and the post is sending twice. How I cand send that post just only one time when the Live is mounted?

Thanks a lot!

You need this:

Phoenix.LiveView.connected?/1

2 Likes