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

139
Vistas
React Bootstrap : Add component to Modal Body

I am using react bootstrap to create a Modal.

Inside of the Modal Body I would like to add another component, e.G. a comment-box component.

         <>
    <Modal show={show} onHide={handleClose} centered>
        <Modal.Header closeButton>
            <Modal.Title>Confirmation</Modal.Title>
        </Modal.Header>
        <Modal.Body>
            Are you sure to mark this change as { action } ? 

            <> 
            <CommentBox>
                
            </CommentBox>
            </>
            
        </Modal.Body>
        <Modal.Footer>
            <button className="btn-secondary" onClick={handleClose}>
                Close
            </button>
            <button className="btn-primary" onClick={handleSubmit}>
                Save Changes
            </button>
        </Modal.Footer>
    </Modal>
    </>

However, it does not work.

I get the followig error :


Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of FourEyeConfirmModal.

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