csaintc

csaintc

Isomorphic ReactJS managed by Elixir

Hey friends!

My company runs a single page app, and it is a hard requirement that we do isomorphic rendering for our front end.

Our back-end is implemented in Elixir. I was thinking it might be nice to cut out the middle man and use Elixir to isomorphically render our reactjs application on our elixir back-end.

Are there any libraries, conference talks, etc. you can point me to that could be helpful?

Thanks a bunch!

Most Liked

bryanjos

bryanjos

Just chiming in to say that lib does pretty much what @OvermindDL1 said. Having elixir apps supervise node processes makes things so much more pleasant in development and production.

We also have another related lib that is for node interaction in general

GitHub - revelrylabs/elixir-nodejs: An Elixir API for calling Node.js functions · GitHub

Eventually we will have the react render lib implemented using that one hopefully

kokolegorille

kokolegorille

Just for information, there is a post abour react_render from the author here…

OvermindDL1

OvermindDL1

Unsure about libraries but it would be pretty easy to do, just setup a Port to a nodejs app that talks over it’s stdin/stdout to your main server, and anytime you need to render out a page then send a JSON of data over stdin and get the page data back (I’d recommend tagging with an ID so you could interlace commands for faster speed if you get nodejs running multicore). It’s the standard BEAM way to talk to external apps like that. :slight_smile:

Now if you want to toss out React and use something else that is better suited, there are tons of options, though it sounds like you might already be tied to react and if you want to ‘isomorphicaly’ use react then a Port is the way to do it, essentially just using react-in-node ‘as’ your template system (no where near as fast as elixir templates, but if you want it ‘isomorphic’ then that’s how to do it). :slight_smile:

Where Next?

Popular in Questions Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New

Other popular topics Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54092 488
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44608 311
New

We're in Beta

About us Mission Statement