next
next copied to clipboard
[RFC] Improve loading state
Current state:
all composables have only one loading state shared between all actions which makes it:
- hard to manage when there is series of actions to perform
- not too flexible when it comes to creating UI with different types of loading
Proposed change:
Change single loading property in composables to be a map of loading states for every action.
e.g. in:
return {
...
availableLocales,
availableCountries,
availableCurrencies,
loading: computed(() => loading.value)
}
loading should become an object containing following bool properties: availableLocales, availableCountries, availableCurrencies.
Optional: we could also add property: 'any' that would be true if any of sub-loading properties is true, otherwise false.