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.