Is LiveView appropriate for this use case?

I just started using Elixir / Phoenix recently and really like it. I am working on a simple site (mostly html) with some JavaScript on some pages that does some calculations and shows a table of results and visualizations sometimes.

The JavaScript code for doing calculations is becoming a bit harder to maintain as there are always edge cases that get missed and harder to debug… I would like to just remove JS for this and write it directly in Elixir but would like to have similar dynamic features as the current javascript code – mostly just onBlur, recalculate and update the table…

My question is:

Some other forum members have commented about sockets timing out and forms getting reset. Some forms I have have many options and would hate to get those reset and instead would prefer to keep existing values and fallback to a regular form POST (via a submit button and no need for onBlur, etc. to trigger under this scenario) if the socket connection does not exist. Is that a possibility? Or when you go down LiveView, you cannot have good 'ol form submission for that page?


1 Like