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

198
Vistas
Is there in React something like 'local' component Context?

I have a set of complex components with many inner parts in some array. On Click I need to create new one and to set in the array. But to deal with its complexity, the single complex component, I wanted to create for each its own 'Context' on the component creation or something similar to deal with its local property drill problems. I don't need redux because it global for all the components.

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

0

Let me put it in answer to point out couple of potential misconception which you might have.

You mentioned about local property drill problems

Below is the explanation of what prop drilling is, there is no such thing as local prop drill. Whenever you mention that you have prop drill problem, you will usually have many components involved

Prop drilling is the process in a React app where props are passed from one part of a tree to another by going through other parts that do not need the data, but only help in passing it through the tree

Second misconception which you might have

I don't need redux because it global for all the components.

Yes, Redux or React Context is available globally for all the components, but they are not accessible to redux by default. All the components do not have default access to redux store by default, in order to access the store, you will need connect or some hooks to access the store.

From the above two misconceptions, I hope you understand the problem that you are trying to solve

about 4 years ago · Juan Pablo Isaza Denunciar

0

I seem to have found a solution. So when I create component with very nested structure I need just one global Context or Redux. In Redux/Context I store array/set of models/object of the complex component, not component itself. When I create the new complex component at the same moment we create the model of the complex component with its id. And each this complex component get reach its model by the id. It global, but we find a model by id, so its at the same time something local. Something like that...

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