How can this be distinguished from the situation when an empty array has arrived?
Closed this issue · 1 comments
polRk commented
SuperOleg39 commented
Hello!
For real-world cases, I can recommend a few options:
- Use react-query for API requests, there will be a useful flags for request current state
- More classic, "redux-like" option, add some flag to
PokemonsStore
, e.g.isFetching
, and some events likerequestStart
,requestSuccess
andrequestFail
. It can be a different store, for performance reason.