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

200
Visualizações
Uncaught TypeError: (0 , react_query__WEBPACK_IMPORTED_MODULE_9__.useQuery)(...) is not a function

This is the code I currently have in the project, but I can not even run it because I keep getting the error I brought in the title: Uncaught TypeError: (0, react_query__WEBPACK_IMPORTED_MODULE_9 __. UseQuery) (...) is not a function

The debugger shows that it's coming right from the line where i declared the useQuery object. Any ideas?

import {
  useQuery,
  QueryClient,
  QueryClientProvider,
} from 'react-query';

const queryClient = new QueryClient()
const api = axios.create({
  baseURL: `http://localhost:5000/api`,
});

export default function QueryProvider() {
   return (
     <QueryClientProvider client={queryClient}>
       <App/>
     </QueryClientProvider>
   )
}

  function App() {
  const classes = useStyles();
  const [table, setTable] = useRecoilState(TableProvider);


  const { status, data } = useQuery(
      'todos',
      async () => {
      const res = await api.get("/")
      return res.data
    },
    {
      refetchInterval: 1000,
    }
  )

 return(
 <p>data</p>
 ):
}
about 4 years ago · Juan Pablo Isaza
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