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

116
Views
Trying to pass parameters through components

So I am creating an app using the movie DB API and I have this Actor component where I am passing the actor id to and when I try to use that Id to link to the person webpage for some reason I am passing an object instead. I am trying to pass the number, is there any way to do this?

    import React from 'react';
// Styles
import { Wrapper, Image } from './Actor.style'

import { Link } from 'react-router-dom';

const Actor = ({name, character, imageUrl, personId}) => {
    console.log(personId);
    return(
        <Wrapper>
            <Link to={`/person/${personId}`}>
                <Image src={imageUrl} alt='actor-thumb' />
            </Link>

            <h3>{name}</h3>
            <p>{character}</p>
        </Wrapper>
    )
}

export default Actor;

So I have these components output to the screen: enter image description here

And when I click on one of them I get this error: enter image description here

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!