DEV Community

Cover image for Understanding data flow in Vuex

Understanding data flow in Vuex

Joe Erickson on August 01, 2019

If you're like me, when you first ran into Vuex, you probably wondered "How the heck does this work?" It's not immediately obvious how these types ...
Collapse
 
raymondcamden profile image
Raymond Camden

"Maybe it's me, maybe I'm just getting old, but that site did not do a great job of explaining how the heck Vuex worked."

Heck no it isn't just you. I really like Vuex, but I struggled quite a bit to get my head around it.

Collapse
 
rifaldhiaw profile image
Rifaldhi AW

Great job, well explained.

I think they should put your graph instead theirs which only show one line flow of data

Collapse
 
therealdanvega profile image
Dan Vega

Really great explanation, thanks Joe!

Collapse
 
pinguinosod profile image
David Cautin

Should I always use getters to access data? or only when data needs to be filtered/formatted/etc?

I mean, if I need raw data, is it ok to take it directly from the state?

Collapse
 
firstclown profile image
Joe Erickson

Good question! I think I'll need to write a post about this. It really comes down to a philosophical discussion more than anything else. You can access data directly from the state, but it might not be the best thing to do. If it's simple data that will never need formatted or a filter, go for it, I would say. But is it always that straight forward?

Yeah, I'm going to write another post talking about this. Thank you for the topic! Stay tuned.