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

202
Vistas
How do I manage state in react with a master-detail component

I'm looking to build the following functionality in a site similar to below: https://au.indeed.com/jobs?q=no%20experience&l=Melbourne%20VIC&from=searchOnHP&vjk=6c88ada376b9317e

What I mean is, I would like to try and build two components. A list of cards on the left and an info pane on the right which populates with information when you click on the left card.

What is the correct way to manage this? Would you use state on the left component and pass it through the tree or use redux and send the state to represent the information?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

State is managed above the list, kind of like this:

const Container = ({things}) => {
    const [selected,setSelected] = useState()

    return (
       <>
          <ThingList things={things} onSelect={setSelected}/>
          <DetailView thing={selected}/>
       </>
    )

}
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