News for hackers. Stuff that matters.
Re:Why I Chose Elixir Phoenix over Rails, Laravel, and Next.js by auraham on Friday October 17, 2025 @03:35PM (#45621050)
Can you elaborate on how React was a better fit than LiveView for your use case?

In my opinion, the main drawback of LiveView is that we assume that the user do no click on the Back button of the browser. In other words, 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 really like LiveView but not sure how to persist the state between page reloads without using Ecto (also, not sure if that is idiomatic).

Re:Why I Chose Elixir Phoenix over Rails, Laravel, and Next.js by arcanemachiner on Saturday October 18, 2025 @07:24AM (#45626478)
> 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

Re:Why I Chose Elixir Phoenix over Rails, Laravel, and Next.js by auraham on Saturday October 18, 2025 @11:48PM (#45631966)
I am aware of that option. However, AFAIK patching links do not prevent the user to press Back button.
Re:Why I Chose Elixir Phoenix over Rails, Laravel, and Next.js by arcanemachiner on Sunday October 19, 2025 @03:05AM (#45632498)
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).