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

267
Views
TypeError: messages.map is not a function

I am making facebook messenger clone using reactjs but this error stops my working as application was running smoothly but unfortunately this error stuck me.

{

    messages.map(messages => (
      <Message username={userName} message={messages} />

    ))
  }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

First of all map() function use for JS array, that's why be sure messages is array, after that if messages is array but it is null in this case you get this error. in addition you can check this question React Uncaught TypeError: this.state.messages.map is not a function

about 4 years ago · Juan Pablo Isaza Report
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!