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

203
Visualizações
ReactJs, My server calls function doesn't work

I'am working on a react Js project and i have a problem.

I try to call a function from the back (which works well) but it does not read my function and does not display the prints of my function.

There is: my function:


const getEvents = async() => {
    console.log("PLZ")
    const test = await getAllEvents();
    console.log(test)

    
}

export const Calendar = () => {
    return (
        <StyledCalendar>
        {console.log("AHHHHHHH")}
        {getEvents}
           </StyledCalendar>
    )}

I shortened the return to make it easier to read.

and there is my calls function:

export const getAllEvents = async() =>
    await axios.post(`${SERVER_URL}/calendar/getAllEvent `, {
    });

It doesn't print(the console.log(PLZ)), but it print the console.log(AHHHHHHH) Thanks for yours answers!

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