MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live_vue and live_svelte. So, I created the equivalent in React, live_react:
https://github.com/mrdotb/live_react
Here is a small demo on Fly: demo.
I have not yet implemented SSR, slots, sigil, and the macro to generate components.
Trending in Announcing
WebAuthnLiveComponent WebAuthnComponents
See this post about renaming the package.
Passwordless authentication for Phoenix LiveView app...
New
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
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
Unstyled Phoenix components....
New
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
Hi everyone,
I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
I’ll shortly be launching Text, a nascent text analysis library.
Current functionality
In this early version (not ready for prime time) ...
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 everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
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
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
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
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
johnknott
Great work! I do wonder if there is some kind of shared abstraction these libraries could build on - if there was something like live_vite or live_frontend, or something like that, then have adaptors for each FE framework.
MRdotB
The LOC of each library is quite short but specific to Vite, Svelte, React.
Have a look at the hooks.js of each
https://github.com/Valian/live_vue/blob/main/assets/js/live_vue/hooks.js
https://github.com/woutdp/live_svelte/blob/master/assets/js/live_svelte/hooks.js
https://github.com/mrdotb/live_react/blob/main/assets/js/live_react/hooks.js
orion
Great work! Thank you for live_react!
I’m not sure if it’s what @johnknott had in mind but have you looked at Komodo?
MRdotB
live_react has been picking up interest, as seen in projects like PhoenixAnalytics. Inspired by the Server-Side Rendering (SSR) features in
live_svelteandlive_vue, I’ve implemented it forlive_react.I released a
0.2.0-betaand will release0.2.0when I’m confident the SSR feature is production ready.ssr demo
MRdotB
I released the stable v1.0.0
I have been using live_react in production for different project.
Breaking Changes:
Features:
Temples-Dev
Hello, I am new to the Elixir community, i think you have a great project. I went through the live example in the github project,i was hoping to find JSX related syntax in the example but i did not. i don’t know if its in there somewhere. which kept me wondering how does live_react workings like react itself. I will appreciate clarification. Also i want to suggest that it will be nice to have the configuration scaffold with a command to get everything setup instead on following the installation guide with a lot of configs. it makes its quiet easy to setup for use. thank you.
MRdotB
Hi! Welcome to the Elixir community, and thanks for your interest!
LiveReact isn’t a full React framework like inertia-phoenix —it lets you render React components inside LiveView / DeadView, not replace it. You can check out the demo to see it in action.
For internals, the source code is short and worth reading.
There’s already a Mix task to help with setup—see the [installation guide]
MRdotB
I released v2.0.0.
Almost everything in this release is a port of work that already existed in
live_vue - props diffing, stream support and
the encoder protocol. Claude did the bulk of the porting.
Big thanks to @Valian
Breaking Changes:
data-propsis now encoded through the newLiveReact.Encoderprotocol instead ofJason.Encoder. Structs passed as props need@derive LiveReact.Encoder(or anexplicit implementation); plain maps are unaffected. See
Upgrading to 2.0.
Features:
data-props-diffinstead of the fullprops being re-sent on every update. On by default
(
config :live_react, enable_props_diff: true), opt out globally withfalseor percomponent with
diff={false}.Phoenix.LiveView.stream/4assigns are supported: a stream passed as a prop is diffedand delivered over
data-streams-diff, arriving on the client as an array whose itemscarry their
__dom_id.LiveReact.Encoderships implementations for the structs you are most likely to passas props:
Phoenix.HTML.Form(including Ecto changeset values and errors),Phoenix.LiveView.AsyncResult,Phoenix.LiveView.UploadConfig,Phoenix.LiveView.UploadEntry, andDate,Time,NaiveDateTimeandDateTime.New guide: Props Diffing and Streams.
New examples site:
The demo app moved out of the library into its own repository and now lives at
https://live-react.mrdotb.com. Every example has Preview / LiveView / React tabs,
so you can read the server side and the client side of the same page side by side.
The 2.0 features have examples of their own:
prop path travels over the wire, unless a component opts out
@derive LiveReact.Encodersends to the client, and what it keeps on the server
assign_async’sAsyncResultreaching React as loading, ok and failed