Good article and nice extrapolation for a global proxified Vuex action, but this has one drawback as far as I see. What happens when you need to have more than one global state loading button on the same page?
All things software & product, honestly - FrontEnd, BackEnd, DevOps, ML - as long as we're solving massive problems.
My code is used by millions of users globally - Potatoes make me happy
If you want to build a system where there's multiple loading states, instead of following a binary toggle function, I would do what was mentioned in the beginning of the blog and have an object with key value pairs of the async actions that are currently active and have loader states subscribe to those actions
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good article and nice extrapolation for a global proxified Vuex action, but this has one drawback as far as I see. What happens when you need to have more than one global state loading button on the same page?
Hey mate!
Thanks for the comment and great question!
If you want to build a system where there's multiple loading states, instead of following a binary toggle function, I would do what was mentioned in the beginning of the blog and have an object with key value pairs of the async actions that are currently active and have loader states subscribe to those actions