-
Hello.
When I use refreshQuery function, then update convertedDataState. I know that useEffect's dependency only works in props or state. What is difference between them? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
on top of that, you don't want a useEffect here. You want to derive state, not sync it:
if you want to optimize, wrap the all in |
Beta Was this translation helpful? Give feedback.
refetch
refetches the query unconditionallyreset
sets the query back to its initial state, then refetches it.on top of that, you don't want a useEffect here. You want to derive state, not sync it:
if you want to optimize, wrap the all in
useMemo
.