03juan
Continuing the discussion from Looking for a guide to setup a pure esbuild and svelte for Phoenix API app:
My main reasons for wanting to implement a Client-side rendering framework over LiveView:
- Lots of client-side reactive interactions that don’t require a constant connection to the server. e.g. manging large data tables and displaying charts and dashboards based on the data.
- Here LV could cause a noticeable lag as requests are sent to the server, processed, and then all the relevant areas of the DOM are updated from the resulting diff. One can use lots of
LiveView.JSandhookscode to glue things together, but this could become quite complex where using a self-contained client-side application would improve the development experience.
- Here LV could cause a noticeable lag as requests are sent to the server, processed, and then all the relevant areas of the DOM are updated from the resulting diff. One can use lots of
- Creating a web application that is primarily going to be used in areas that have very poor internet connectivity.
- This would require good caching and syncing strategies such that the user is able to do their work and then the changes are synchonised with the server whenever the connection is restored.
I’m sure others will be able to add to this list from their own experiences.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
bdarla
Thank you for responding to my question!
I guess as a first step, I need to dig deeper into Svelte to understand the details.
However, if I am not mistaken, Svelte is not like React. If I understood correctly from the quick glance I had, it is also an SSR solution. Although it can support SPA, as I understood, it is not really recommended (not studied the details for this though).
Anyway, I only wanted to see if there something explicit in that project that rendered Svelte as the optimal solution.
03juan
Svelte started as a pure client-side reactive rendering library and a direct competitor to React’s client-side framework.
They have both evolved to also include server-side rendering functionality as javascript/node backend developers wanted the same ability that we’ve always had with LiveView, for the server to create the initial page rendering and then the client-side code takes over the reactivity.
03juan
I don’t see it as a matter of what is recommended, but what are the project’s requirements.
As a js/node dev, I would want to have my server generate the html (SSR) and then my client-side app take over the interactions (CSR). In this case I would logically reach for the same tool to do the job, so use svelte/react/etc. for both SSR and CSR.
As a LiveView dev, I would want to generate as much as possible from LV, and if the need arises refactor some of my code and templates to run purely in the client. Here there a couple of options
LiveSvelte.renderin LiveView to SSR the svelte component, and then svelte CSR takes over the reactivityHope this helps
bdarla
Thank you for the elaborated responses! Indeed, Svelte can very well be a replacement for React (or Liveview).
roganjoshua
You can use Both - where aplicable and they work together quite easily and well.
https://medium.com/@alistairisrael/phoenix-1-7-with-svelte-12257d853ed1