3 ms·
Yes, I would create two different projects, one Ruby only and one JavaScript only. I wonder if there is a well established pattern for server side rendering of
by pmontra 10y ago
Yes, I would create two different projects, one Ruby only and one JavaScript only.
I wonder if there is a well established pattern for server side rendering of some pages in this kind of applications. Obviously one can use Rails views for some important pages but how not to duplicate HTML in Rails and React?
- tzaman 10y agoHm, why would you need to render some pages in Rails? Why not just go React all the way and use Rails for API only. If you absolutely do need them, I would just separate them by routes.
- pmontra 10y agoIf the SPA is large, server side rendering is faster. Users get the first page in milliseconds, whatever page it is, then the SPA loads and takes over. I would do that for a few entry points to the site, for example the ones that get into the sitemap in the Google results page.