Skip to content

cacheDataLoaded resolved after isLoading #1621

Answered by phryneas
victorwedo asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, that is to be expected. cacheDataLoaded resolves as part of a middleware that reacts to the fulfilled action - and runs after the reducer, as the reducer is synchronous while cacheDataLoaded is a promise that will only resolve on the next tick.

To be honest, I don't think of a nice solution for you here from the back of my head. Personally, I would really not do any of that "filling up other endpoints from a result" things.
If you never want to make an actual request, useQueryState might be an option instead of useQuery.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@victorwedo
Comment options

Answer selected by victorwedo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants