DEV Community

Lee Wynne
Lee Wynne

Posted on

Server side or client side rendering? Vue | React + Rails API

Hey ๐Ÿ‘‹

I am thinking of a side project that will leverage a Rails API backend (because I love it, it makes me happy, no science or general logic involved in that decision).

The front end is likely to be Vue or React depending on which one integrates with crypto wallet sign in the easiest (specifically metamask or nami).

Question: Whatโ€™s the benefit to doing Vue / React with Rails server side versus client side?


Top comments (2)

evieskinner18 profile image

Do you mean what's the benefit to keeping your Rails code to server-side only, rather than using it to create views/erb templates? If that's what you mean, then I think that's a great approach because:

  • You can separate your concerns into different directories and even different git repos if you want
  • You can write unit tests for each set of concerns that are easier to find and follow
  • If you decide you want to change the front end client that consumes your Ruby API in future, you can easily do so since they're loosely coupled
  • If you find yourself needing help from the open source community with your front end, the numbers of people skilled in Vue/React out there are very high
benjioe profile image