Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda