Skip to content

Strategy for combining with react-query #2033

Answered by jrmyio
jonlambert asked this question in Q&A
Discussion options

You must be logged in to vote

I tried MST with react query but react query' caching mechanism seemed to only work with JSON so this could explain why your computed properties are returning undefined as your mst object (that is stored in react query) might be converted into a simple object by react query's cache.

What I did was return an MST snapshot rather than an MST object in useQuery. Then create the MST object afterwards.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by coolsoftwaretyler
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #1697 on June 27, 2023 04:20.