Replies: 1 comment
-
This is exactly what is being discussed and worked on in issue #203! I believe React Query is currently under development while SWR is planned. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a better way to refresh the data than using
watch=true
? Let's say I have a single page. It displays a balance of five tokens, reserves value, liquidity pool balance, etc. I would like to update the data when it changes on the network (not necessarily real-time, it may be every few seconds) or after a user action. I can setwatch=true
for each hook, but it generates a request to Infura on every new block. I know that's what it is for, and it works as expected, but addingwatch=true
for ~10 hooks generates a lot of requests to Infura. Is there a smarter way to reduce the number of requests? I'm testing a solution with custom hooks that useswr
library because it allows to cache the data and refresh it automatically every n seconds (refreshInterval
). It might work, but I feel it's not the best idea.Beta Was this translation helpful? Give feedback.
All reactions