How to show a modal from the server and hide with Phoenix.LiveView.JS and repeat that

Another way of showing the modal from the server is to push_event/3 to a hook and then liveSocket.execJS.

https://hexdocs.pm/phoenix_live_view/0.17.2/js-interop.html#executing-js-commands

1 Like