next icon indicating copy to clipboard operation
next copied to clipboard

[RFC] Improve loading state

Open lukeromanowicz opened this issue 4 years ago • 0 comments

Current state:

all composables have only one loading state shared between all actions which makes it:

  1. hard to manage when there is series of actions to perform
  2. 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.

lukeromanowicz avatar Mar 19 '20 11:03 lukeromanowicz