I'm trying to get a spinner to show up when a big table of data is loading from local cache, but the isLoading boolean is only true when the page is reloaded (because it is set to true in the initial state).
How do I get this dispatch to change isLoading and trigger a rerender before it continues with the execution of the reducer?
I'm trying to get a spinner to show up when a big table of data is loading from local cache, but the
isLoading
boolean is only true when the page is reloaded (because it is set to true in the initial state).How do I get this dispatch to change
isLoading
and trigger a rerender before it continues with the execution of the reducer?I've also tried to
await
the dispatch, and triedsetGlobal({ isLoading: true })