vendredi 27 mars 2015

Setting up React on Node as a rendering daemon

I've recently dived into React+Flux on the front-end, and I love it! But I want to also be able to use React on the back-end to avoid having to duplicate views and rendering logic.


I've seen that React supports server-side rendering if you use Node, but I do not use Node for my back-end logic.


So I'm wondering, can I set up a daemon written in Node that just renders HTML based on the data it receives and the root React component?


What I have in mind is to have my back-end application call this daemon with data already prepared (so that domain logic can live on my main back-end application), get HTML, and return that to the front-end.


Is this approach feasible? Has this been done before? I'd love some feedback!


Aucun commentaire:

Enregistrer un commentaire