DEV Community

Aks
Aks

Posted on

What is better for SSR in Vue.js Redux or Vuex?

What in your experience is better for server side rendering in Vue.js? Redux or Vue.js?

Top comments (6)

Collapse
 
samtsai profile image
Sam Tsai

As far as SSR Vue, I would recommend checking out Nuxt.js. It plays well with Vuex but it will be a departure from rxjs and redux, though principles will be similar.

Collapse
 
ardennl profile image
Arden de Raaij

'Vue.js Redux' is VueX. VueX is the first-class state management system for Vue.js. It has nothing to do with Server Side Rendering. If you need SSR, I'd suggest taking a look at nuxt.js

Collapse
 
akanksha_9560 profile image
Aks

Yes but I need to pre fetch the data before rendering process, meaning my data needs to live outside view components. Vue.js documentation explains how to do that with vuex but is it possible to do it with Redux?

Collapse
 
ardennl profile image
Arden de Raaij

Ah like that! Yes you could do that with Redux, it's framework / view system independent. You could go for what you are most comfortable in. The differences between VueX and Redux are not that big btw, so it might be nice to use VueX, as it's a 'first-class citizen' of Vue.

Thread Thread
 
akanksha_9560 profile image
Aks

I like redux because I can use rxjs with it. Could you point me a direction where I can see an implementation of Redux with Vue.js used for SSR?

Thread Thread
 
ben profile image
Ben Halpern

I'm not super familiar with the latest best practices, but I'd check out github.com/airbnb/hypernova for a possible solution.