# React vs Phoenix Liveview

**URL:** <https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134>\
**Category:** Discussions\
**Tags:** phoenix, react, liveview\
**Created:** [June 2, 2022, 9:02am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134 "2022-06-02T09:02:22Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![laiboonh](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/laiboonh/32/8524_2.png) [@laiboonh](https://forum.elixirforum.com/u/laiboonh)\
**Post date:** [June 2, 2022, 9:02am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/1 "2022-06-02T09:02:22Z")

</div>

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:

1. Using one language to code frontend and back saves us from context switching
2. Arguably easier to do as there will no need for data serialising and de-seriialising or REST
3. …

---

<div class="post-metadata">

**Author:** ![egze](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/egze/32/13522_2.png) [@egze](https://forum.elixirforum.com/u/egze)\
**Post date:** [June 2, 2022, 10:11am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/2 "2022-06-02T10:11:38Z")

</div>

What’s in it for you? Why are you trying to convince them?

Curious to hear more of your own arguments. (Not saying it’s a bad initiative, but trying to make you express your own reasons, and not the forums)

---

<div class="post-metadata">

**Author:** ![kanishka](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/k/3e96dc/32.png) [@kanishka](https://forum.elixirforum.com/u/kanishka)\
**Post date:** [June 2, 2022, 12:43pm UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/4 "2022-06-02T12:43:50Z")

</div>

I am new to liveview, familiar with elm, rescript-react, angular, and various ssr solutions before SPA’s came around.

I am trying to figure out if there are operational downsides to using liveview, since it sounds like liveview changes you from running a mostly stateless backend to a stateful backend? Do you have to put more effort into horizontal scaling and thinking about node fail over?

---

<div class="post-metadata">

**Author:** ![laiboonh](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/laiboonh/32/8524_2.png) [@laiboonh](https://forum.elixirforum.com/u/laiboonh)\
**Post date:** [June 3, 2022, 12:52am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/5 "2022-06-03T00:52:21Z")

</div>

Mainly because i am allergic to javascript. 😃

---

<div class="post-metadata">

**Author:** ![kanishka](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/k/3e96dc/32.png) [@kanishka](https://forum.elixirforum.com/u/kanishka)\
**Post date:** [June 3, 2022, 1:22am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/6 "2022-06-03T01:22:51Z")

</div>

Elm is great fun, if js is your only objection, but I love the simplicity of server side, no API

---

<div class="post-metadata">

**Author:** ![laiboonh](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/laiboonh/32/8524_2.png) [@laiboonh](https://forum.elixirforum.com/u/laiboonh)\
**Post date:** [June 3, 2022, 1:35am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/7 "2022-06-03T01:35:19Z")

</div>

Im a fan of elm as well. Keep a look out for this [GitHub - gren-lang/compiler: Compiler for the Gren programming language · GitHub](https://github.com/gren-lang/compiler).

---

<div class="post-metadata">

**Author:** ![cblavier](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cblavier/32/29763_2.png) [@cblavier](https://forum.elixirforum.com/u/cblavier)\
**Post date:** [June 3, 2022, 4:58am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/8 "2022-06-03T04:58:59Z")

</div>

If you’re fond of automated testing, you can argue that it is way easier to test Liveview code than React.

---

<div class="post-metadata">

**Author:** ![mindok](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mindok/32/13538_2.png) [@mindok](https://forum.elixirforum.com/u/mindok)\
**Post date:** [June 3, 2022, 5:04am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/9 "2022-06-03T05:04:39Z")

</div>

Have you read the history lesson on why liveview came to be? You may get some answers there.

> **[How We Got to LiveView](https://fly.io/blog/how-we-got-to-liveview/)**
>
> I'm Chris McCord. I work at Fly.io and created Phoenix, an Elixir web framework. Phoenix provides features out-of-the-box that are difficult in other languages and frameworks. This is a post about how we created LiveView, our flagship feature.

---

<div class="post-metadata">

**Author:** ![tj0](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@tj0](https://forum.elixirforum.com/u/tj0)\
**Post date:** [June 3, 2022, 6:31am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/10 "2022-06-03T06:31:02Z")

</div>

> **[Framework - Phoenix Liveview - Three Years of Phoenix Liveview and Elixir](https://sheer.tj/three_years_of_phoenix_liveview_and_elixir.html#framework_liveview)**
>
> I’m a tiny bit anti-cloud at this stage of my life,1818After spending a decade and several hundred million dollars, I really don’t want to look at AWS billing ever again. Or be taking out to a celebration dinner for giving them a 8 figures of money....

That’s a pretty long article, but there’s probably 1000 words on phoenix liveview performance, maintainability, etc.. but at the end of the day it really depends on your application.

---

<div class="post-metadata">

**Author:** ![tfwright](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tfwright/32/20299_2.png) [@tfwright](https://forum.elixirforum.com/u/tfwright)\
**Post date:** [June 3, 2022, 8:43am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/11 "2022-06-03T08:43:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DevotionGeo](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/devotiongeo/32/20538_2.png) [@DevotionGeo](https://forum.elixirforum.com/u/DevotionGeo)\
**Post date:** [June 17, 2022, 7:37am UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/12 "2022-06-17T07:37:51Z")

</div>

It’s a nice post by Chris McCord!  
LiveView is a very big thing in Web Development history. We need to have a documentary live the Elixir Documentary.

---

<div class="post-metadata">

**Author:** ![caleb-bb](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/caleb-bb/32/26803_2.png) [@caleb-bb](https://forum.elixirforum.com/u/caleb-bb)\
**Post date:** [June 18, 2022, 4:47pm UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/13 "2022-06-18T16:47:57Z")

</div>

> [@laiboonh](#):
>
> Mainly because i am allergic to javascript. 😃

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.

---

<div class="post-metadata">

**Author:** ![innocentoldguy](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/i/7ab992/32.png) [@innocentoldguy](https://forum.elixirforum.com/u/innocentoldguy)\
**Post date:** [July 24, 2024, 9:06pm UTC](https://forum.elixirforum.com/t/react-vs-phoenix-liveview/48134/14 "2024-07-24T21:06:08Z")

</div>

In my experience, LiveView is faster than React (resulting in a better user experience), is truly multi-threaded rather than using an event loop, is easier to debug, requires a lot less code, and is easier to manage state. The fact that it isn’t JavaScript is also a big win, in my opinion.
