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

160
Views
how can i use what i imported in another component in context API with arrow function

pls i wanted to use placeInfo,reviews,detailsInfo,news coming from data file. instead of putting value='hello' [import { placeInfo, reviews, detailsInfo, news } from '../data';<InfoContext.Provider value={placeInfo,reviews,detailsInfo,news} >][1]i doubt if i can use it direct like this value={placeInfo,reviews,detailsInfo,news} which is giving me error or i should put it in var

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

0

Wrap the value in an object like this value={{placeInfo, reviews, detailsInfo, news}}

or create the object on a separate line like this:

const value = {
   placeInfo,
   reviews,
   detailsInfo,
   news
};

Then pass it as value={value}

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!