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

206
Vistas
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 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