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

126
Views
How to separate the array items in my list of actors?

I am trying to separate the displayed list of actors (which will also act as a link to the actors bio page) that each movie will have in my "netflix-like" app with a comma followed by a space between each actor. What I currently have now tells me that the ".join()" method in not a function. How can I fix this?

{movie.Actors.map(actor => <Link to={`/actors/${actor.Name}`} className="value">{actor.Name.join(", ")}</Link>)}

Thanks!

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

0

You can join jsx with comma like this:

{movie.Actors.map((actor) => (
      <Link key={actor.Name} to={`/actors/${actor.Name}`} className="value">
        {actor.Name}
      </Link>
    )).reduce((prev, curr) => [prev, ", ", curr])}

You can take a look at this sandbox for live working example.

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!