Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!