G
G
Gimir2020-06-01 17:05:31
Vue.js
Gimir, 2020-06-01 17:05:31

Nuxt.js vs Custom SSR. What is the best way to implement server side render in Vue.js?

Hello, today I read an article on Habré , which talks about the limitations that a framework like Nuxt.js creates during development. The author of the article did not use Nuxt, but used Next.js on React, and when he was going to make a project on Vue, he decided to implement SSR on his own, because - as he writes - Nuxt will not give him the necessary development flexibility.
I, in turn, used Next.js a little while making an application on React, and almost immediately abandoned it, since it created additional difficulties in using Redux, but there are no such problems on Nuxt, it works out of the box with Vuex.
The author did not really explain what points he was writing about. I wrote to him, did not answer.
At the moment, I'm just doing a project on Vue, and have adopted Nuxt.js for server-side rendering. But after reading the article, there were fears that unnecessary problems might arise during development.

Question: what is the best way to do SSR on Vue? What difficulties may arise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Pautov, 2020-06-01
@Gimir

Nuxt.js vs Custom SSR
I am for nuxt, because everything is out of the box, it works like clockwork, a lot of convenient abstractions
how best to do SSR on Vue
take nuxt and be glad that everything works out of the box.
What difficulties may arise?
Yes, there shouldn't be any problems. No matter how many projects I did on nuxt, I never ran into an SSR problem. All the difficulties are working with libraries that internally access window or document. You just need to be able to work with such things, otherwise everything is fine.
What the author came up with, I xs, there may be some problems and there may be, but in the article about them there really isn’t a word and in experience I didn’t meet a single SSR problem in nuxt. The author showed how you can do it differently, it's neither bad nor good. It's just another approach. Because you are probably still a beginner, just take nuxt and enjoy its work. And if you find problems that the author of the article did not agree on, then I would be happy to read about it.
Don't like nuxt? For God's sake, grab the official vue-server-renderer, read the doc, tweak and go.
PS It is important to understand and remember that nuxt is somewhat different from just a vue project with a large number of abstractions and, in some places, other code constructions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question