bismark

bismark

Does anyone have an experience or know of any resources around progressively migrating from a React SPA to a LiveView app?

We’ve got a rather large frontend built fully in React with a Phoenix + Absinthe backend, but we’d love to start progressively building new features in LiveView. Just rewriting everything in one shot would be a hard sell, but coming off of ElixirConf we couldn’t help but feeling a bit envious of all the amazing stuff happening in the LiveView world. Open to hearing any ideas for how to start the process..

Showing Posts 1 to 8

zorn

zorn

I recently came off a project with Ember, React, and LiveView all working simultaneously. Part of my job was to help the effort to finish converting the Ember stuff into LiveView so Ember could be dropped entirely. We did it like you said, in small chunks.

It is doable. I did not configure the parallel setup, so hard to give any firm recommendations. I recall we configured the React router to be the first opportunity to match a URL request/path, and then if none could be found we would then let the Phoenix router attempt to handle it.

One other idea/note is: you might want to (at least at first) build your LiveView to use the same GraphQL endpoint as the React experience used to make sure to maintain the domain/data layer as close as possible. In time you might replace that internal use with more traditional Phoenix business domain contexts.

Good luck.

Sebb

Sebb

Can’t help, but I’d love to do the same to an Angular app. And have no idea how to tackle this.

bismark

bismark OP

Interesting idea I hadn’t considered, thanks!

LostKobrakai

LostKobrakai

You can also go the other way round with GitHub - poteto/terraform: A simple plug for incrementally transforming an API into Phoenix. Check out the blog post: · GitHub

This tries to match a route in phoenix and otherwise falls back to a separate router, which you can use to call into whatever else you need.

ityonemo

ityonemo

I am in the middle of doing this. First step is to get your spa off of your hosting service and be served from Phoenix itself. You’ll also migrate all of your auth in the process. We are using auth0 and let me just say non-spa auth0 is way, way saner than spa auth0. (As an aside, especially for this, I recommend not using auth frameworks e.g. ueberauth – do it yourself with plugs so that you have a comprehensive understanding of what’s up)

For us this is a dashboard and there was a concerted effort to move to webcomponents a few months ago that was backburnered, so lv is an excuse to deploy that technology, and we’ll be hosting the lv at a /beta route that will present the same information as / and one day we just flip it over

bolducp

bolducp

@bismark I can ask how this ended up turning out for you, and whether you’ve got any advice to share?

egeersoz

egeersoz

I occasionally become interested in switching my side project app frontend from Vue to LiveView. However, the lack of open source front-end component libraries is what is stopping me. I currently use Vuetify and it is essentially unparalleled in terms of both variety and robustness of components (both stateless and stateful) as well as the sheer amount of dev effort that goes into it every single day. Attempting to create something similar by myself using LV components is unthinkable. I couldn’t even dream of doing it even if my side project was my full time job.

We actually use LV at my current job and having to create (and maintain/update) our own UI components is a huge hassle. It slows us down a lot, and I bet that holds true for many other dev teams as well (whether they realize it or not).

felix-starman

felix-starman

We migrated from angular to fully liveview by building specialized liveviews and mounting them using iframes since it was the same domain. Once we got to the point of having two liveview iframes on the same page, we usually just rewrote the page.

More recently there is live_state which could be an option for migrating your data layer while kicking the can on some of your more complex react components.

Comboboxes and multi-select drop-downs are the largest missing component of both html itself and the ecosystem for liveview right now. There are plenty of dropdown libraries that work perfectly fine, but they have subtle gotchas, not unlike react, but because your state is on the server by default, when writing livecomponents, it tends to make things more difficult.

I have not spent much time with web components, but it sounds like people have found great promise with shoelace, carbon and Adobe spectrum 2

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
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
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Dmk
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
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews