Vuex Initiation and Conditional Reload

Published 1 year ago by jgravois

I am working on an application with HUGE datasets. I discovered VUEX and thought I could save users long waits so I added the store initialization to the navbar (since it is omnipresent throughout the app). The initial load time for the homepage jumped to 8 minutes.

I was also bothered by the fact that a user wanting to jump online just to reserve a company vehicle had to endure the loading of all of the modeling data ... just not right.

I have been looking all week for the correct way to load data to the store when needed and then use that data wherever appropriate. However, I can't solve the means of determining IF the data is in the store or not and it hits the database again every time those pages are loaded.

If anyone has insights or a resource or an example of doing this correctly, I would greatly appreciate the sharing.

Thanks in advance!

11 months ago (130,460 XP)

vuex do have 4 stated actions, mutations, state, getters

actions call mutations save state hold data getters get the data

i'm learning too about vuex, that it is what i do understand so far.

Please sign in or create an account to participate in this conversation.