Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> if the user changes the page by pressing the Back button, then Phoenix closes the socket, creates a new one, and the state is lost

I don't think that has to be the case. You can use "patch" style links to navigate from page to page in the same session.

https://hexdocs.pm/phoenix_live_view/live-navigation.html



I am aware of that option. However, AFAIK patching links do not prevent the user to press Back button.


I don't see why that would affect it, unless that Back button press modifies the URL such that it is out of the current live session, which would trigger a page reload.

My LiveView is rusty, but I encourage you to reconfirm your assumptions, as I think that things work the way we both hope they do (as long as the live session doesn't change).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: