laiboonh
React vs Phoenix Liveview
Hi all,
I am trying to convince my team to use liveview over the current react. What are some of the points where one should consider using liveview instead of react?
To start off:
- Using one language to code frontend and back saves us from context switching
- Arguably easier to do as there will no need for data serialising and de-seriialising or REST
- …
Most Liked
laiboonh
Mainly because i am allergic to javascript. ![]()
mindok
Have you read the history lesson on why liveview came to be? You may get some answers there.
tfwright
For me the biggest advantage is keeping all data management in one place. With a react front end, you basically have 2 applications, and each requires its own set of patterns, tests, etc to deal with state. In comparison with just react (it is of course possible, arguably necessary, to leverage other libs to help) live view is a lot more equipped to do this in a robust, reliable way.
In my experience, unless you have absolute top of the line expert react devs, you are looking at 3 or 4 or even more times as much dev time.
I guess this falls under “no need for API” but i feel that formulation drastically undersells the advantage.
cblavier
If you’re fond of automated testing, you can argue that it is way easier to test Liveview code than React.
caleb-bb
I have found that this is actually a great selling point for LiveView. A sizable minority of developers cannot stand writing anything in JS and choose LiveView for that reason.
Another thing is testing. LiveView tests are relatively painless to write. You can bolster this by pointing out that many developers are allergic to testing or documenting anything, and LiveView makes it considerably easier to coax your devs into doing so.








