4 ms·
When you use a front-end framework like React, there are UI changes you can make that must hit the server for information and other UI changes that can be done
by innocentoldguy 5y ago
When you use a front-end framework like React, there are UI changes you can make that must hit the server for information and other UI changes that can be done locally without interacting with the server. LiveView really shines in cases where you’re hitting the server anyway, but JavaScript can be more efficient for client-side-only changes. So, if you want, you can combine LiveView and JavaScript to optimize your site for both types of UI changes. You don’t have to. You can use LiveView exclusively, but the choice to combine LiveView and JavaScript is there if you want it.
Personally, I think React is a bloated choice if you’re going to use both LiveView and JavaScript. In cases where I use both, I typically use a small framework like AlpineJS or vanilla JavaScript for client-side-only changes.
- void_mint 5y ago> Personally, I think React is a bloated choice if you’re going to use both LiveView and JavaScript. In cases where I use both, I typically use a small framework like AlpineJS or vanilla JavaScript for client-side-only changes. Good to know! That's probably why this boilerplate generator only has a handful of (what I think are) smaller JS libs and not Vue/React?
- pdimitar 5y agoYep. What your parent poster said is the accepted common wisdom in the Elixir Phoenix circles.