Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

216
Visualizações
Just reload the data for one specific entity of a list using useQuery

Let's say I load a list of entities using the useQuery hook of React Query. After updating one entity of this list I don't want the whole list to be reloaded, just the data for this specific entity.

How could you implement this behaviour using the useQuery hook? Is it possible to specify that React Query should not reload the whole list and just reload the data for this specific entity?

Thank you for your help.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use queryClient.setQueryData in the function onSuccess

and update your entity on the cache that contains all entity.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda