Skip to content
Discussion options

You must be logged in to vote
  • refetch refetches the query unconditionally
  • reset 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:

const { data } = useQuery(...)
const convertedData = converting(data)

if you want to optimize, wrap the all in useMemo.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by jangys
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