dvajs / dva

🌱 React and redux based, lightweight and elm-style framework. (Inspired by elm and choo)
https://dvajs.com/
MIT License
16.24k stars 3.17k forks source link

Different Loadings for same effect #2428

Closed anuragsachdeva28 closed 3 years ago

anuragsachdeva28 commented 3 years ago

Background

We know this that DVA provides us a feature of adding isLoading functionality to our component which lets us add a loader until the time our dispatched effects gets completed. I wanted to know whether its possible that we get different loaders when we call different instances of same effects.

Additional context

Suppose I have a common service made for fetching a particular data on screen. That particular service is getting called using a fetchData effects. DVA provides me with loading functionality which we can connect to our fetchData effect. Now this fetchData is getting dispatched many times depending upon the number of components on a particular screen. How can I have different loaders for each component when the same effect is getting dispatched multiple times at the same time?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.