News for hackers. Stuff that matters.
Re:Phoenix LiveView: Async Assign Pattern by vinnymac on Wednesday June 14, 2023 @03:54PM (#36331646)
I haven't written Elixir professionally the last couple of years, but I was an early user of LiveView when it was first demoed at a conference.

As someone who currently writes applications using React Server Components, I am interested to see how concepts like LiveView evolve over time. We are now shipping significantly more HTML than before, and a lot less Javascript, as more has been moved to the server.

Makes me wish LiveView was portable to every other platform I work on, rather than having to convince companies to write more Elixir (although that isn't a bad thing).

Re:Phoenix LiveView: Async Assign Pattern by nocsi on Wednesday June 14, 2023 @04:07PM (#36331820)
There's https://native.live if you want to deploy it as a native app. You can also embed React Components into LiveView if you wanted. Elixir can be anywhere you want it to be.
Re:Phoenix LiveView: Async Assign Pattern by gnutrino on Wednesday June 14, 2023 @04:23PM (#36332055)
I haven't looked into this much, but saw someone do a talk on it at ElixirConf maybe two years ago. I bet it's much more robust now.
Re:Phoenix LiveView: Async Assign Pattern by floodfx on Wednesday June 14, 2023 @05:31PM (#36333026)
There is a port of it to JavaScript/Typescript. https://LiveViewJS.com

It uses the same front end javascript from Phoenix and speaks the same protocol.

Note: am author

Re:Phoenix LiveView: Async Assign Pattern by jjdeveloper on Wednesday June 14, 2023 @06:49PM (#36333935)
Does this work with Astro (or Next.js)?
Re:Phoenix LiveView: Async Assign Pattern by nhumrich on Wednesday June 14, 2023 @07:02PM (#36334078)
You could look into htmx, which is a more language agnostic way to do it.
Re:Phoenix LiveView: Async Assign Pattern by brightball on Wednesday June 14, 2023 @08:18PM (#36334766)
The downside to doing this in other languages is that there is a collection of trade offs to do it well that aren’t easy outside of the BEAM.