Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!