React Query refetch is refetching very slowly
So I'm running into an issue with react query where I am having to put an event listener which refetches the data to display.
Essentially, we're using a 3rd party api to schedule meetings (Nylas), and their api is interesting, and requires you to attach a modal to the window. We are refetching the data when the window sees the modal closing. We know that the event listener is running due to a console.log.
However, when we call the
Essentially, we're using a 3rd party api to schedule meetings (Nylas), and their api is interesting, and requires you to attach a modal to the window. We are refetching the data when the window sees the modal closing. We know that the event listener is running due to a console.log.
However, when we call the
refetch function, the data doesn't update right away, instead, it will stall for a few seconds, and then eventually update. We know that the data is updated, since when you reload the page, the data is correct. Any ideas on what I could be doing wrong here? Should I be running a useMutation despite not owning the 3rd party api? Am I misunderstanding refetch? Thanks in advance!