[Vuejs]-Pinia|Vue3 I can't access the property of the object that returned from the Pinia action

0👍

every UX that has data is coming from remote source (async data) should has spinner or skeleton.

you can use the optional chaining for safe access (if no time to await):

return this.getUserOnlineStatus?.[this.getUserOnlineStatusIndex - 1]?.['onlineStatusText']

Leave a comment