Hi!
Do you really want to wait until the server event is handled before changing the page?
If so, you have a few options:
- update an assign and let the LiveView update the page HTML
- send an event back to the client, which you can handle within a client hook
- dispatch an event stored in an attribute
- maybe others I don’t think of now
But maybe you’d be better off doing an optimistic UI change, see José Valim explain in https://youtu.be/fCdi7SEPrTs?si=iyxZM8FdE7clKYKI.
Also at Syncing changes and optimistic UIs in the official docs.






















