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

95
Views
Passing multiple values as props

How can I pass query to Story component

   function Story({data}) {
       return (<div></div>)
   }

   function Feedbacks({feedbackdata}) {
        const {query, feedbacks} = feedbackdata;
      
        return (
            <div>
                {feedbacks.length > 0 && feedbacks.map(feedback => <Story key={feedbacks.id} data={feedback}/>)}
            </div>
        )
    }
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Just add it as prop?

and make sure that your Story function/class component handles that extra prop

   function Story({data}) {
       return (<div></div>)
   }

   function Feedbacks({feedbackdata}) {
        const {query, feedbacks} = feedbackdata;
      
        return (
            <div>
                {feedbacks.length > 0 && feedbacks.map(feedback => <Story key={feedbacks.id} data={feedback} query={query} />)}
            </div>
        )
    }
about 4 years ago · Juan Pablo Isaza Report

0

You add a prop to Story.

function Story({data, query}) {
  return (<div></div>)
}

Then pass in that prop like:

<Story key={feedbacks.id} data={feedback} query={query} />

See the docs for more info about props. You can add as many as you like!

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!