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

90
Vistas
avoiding multiple modals on page

I have a page where I have a grid of elements that need buttons to request or show more data that won't fit on the page and I don't want the page to change.

I would like the modal template in their own component, not to clutter up the parent. Doing this, I have been forced to put a button to open the modal in the modal component which then gets put into the parent. This causes many unused modals to be in memory.

How can I have lots of buttons on the page that create modals without having the modal in memory ready for a show/hide.

Ideally, I'd like a component I can just feed props to so it knows what to display and I can open/close it with the proper visuals and interactable components (input box, buttons, etc).

I am trying to avoid using a third party dependency, as I have found a few modal specific npm packages, I don't think this is complicated enough to need a dependency. The way I have been creating modals though doesn't work when I have a lot of buttons that spawn modals on the same page.

about 4 years ago · Juan Pablo Isaza
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