Ensure that Vuex state is loaded before render component
问题 I have a add-user.vue component. It is my template for adding a new user and editing a existing user. So on page load I check if route has a id , if so I load a user from a state array to edit it. My issue is that user is undefined because the state array users is empty. How can I ensure that my user object isn't undefined. It does load sometimes but on refresh it doesn't. I thought I had it covered but nope. This is my setup. What am I missing here? Store state: { users: [] }, getters: {