Replies: 2 comments 3 replies
-
Note: if I understand correctly, there is a direct event which means I need to updated the value shown in B, it means I shouldn't use a useEffect, hence my aversion to using it and curiosity towards finding a better way of doing this 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
-
you'd need to show a reproduction please. calling |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In
Component A
, I fetch and mutate a garage location:Then, in
Component B,
I grab thegarageLocation
like so:But, when I update the
garageLocation
in A, it does not re-fetch in B, despite updating the cached value onSuccess.I know how to solve this with a useEffect as shown above.
I tried this and it does not work (since the cached value never updates):
Is there a better way to do this in tanstack without making another network request?
Beta Was this translation helpful? Give feedback.
All reactions