Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

151
Vistas
How to add autorefecting in reactQuery?

Hi I am working with a graphql API and I need to automatically re fetch data after an interval(eg. 3 second). I am using reactQuery and tried some hacks like setInterval but its not working fine.

const { data, isLoading } = useQuery(['get_trnx_logs', quoteTokenAddress], () => {
  return bitqueryService.getTokenPairTranxLogs(quoteTokenAddress)
})

const feedData = data?.ethereum.dexTrades
? settingTranxLogData(quoteTokenAddress, data.ethereum.dexTrades)
: [] 

Please help me with this, Or is there a way with Ajax to that also?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

react-query supports a refetchInterval option for that:

useQuery(key, fn, { refetchInterval: 5000 })

this refetches every 5 seconds.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda