Post

Finally found some time to try the Phoenix/Inertia/React combo, and I can honestly say it feels much better than LiveView to me. Heavy emphasis on "to me". I don't hate JavaScript. So to be able to use the fantastic Elixir ergonomics, with React, is a big win.

0 reposts10 likes

My main grips were the js-hooks, and component organization in general. With Inertia I just pull all the good stuff from TailwindUI/Catalyst and move on.

Ultimately, the code feels less intimidating. `UserAuth.ex` is small, front-end code is properly colocated, and half of the changesets are now gone.

Just a quick pitch for LiveState, its designed to be very close to LiveView but let you render the front end however you'd like: github.com/launchscout/.... Most of the examples are web component based, but you can use it with anything

github.comGitHub - launchscout/live_state: The hex package for the server side of live stateThe hex package for the server side of live state. Contribute to launchscout/live_state development by creating an account on GitHub.

Two reasons: 1. I evaluate Inertia for other uses as well. I recently migrated a Rails backend from the deprecated webpacker to Vite, but Inertia is still an option to simplify things further.

2. Inertia is popular, especially in the Laravel world. I've relied in the past on niche libraries that do some plumbing between technologies, and every time I got burned. I also don't want Liveview at all - it's a lovely technology that doesn't fit my needs.

With codesplit and treeshaking done I have no complains anymore. I was afraid of the bundle size initially, but now it's fine. I never really liked liveview so I can't give a proper comparison. Ultimately I think the codebase is simpler and more flexible. Happy to share specifics.

Component organization and rapid prototyping are something I value, so I'm in the same boat. If you want websockets or streaming nothing is stopping you from using them. You lose the HTML diff'ing that comes with LiveView. You still use Phoenix as a backend.