I am using react, react-bootstrap and typescript. I get the following error:
JSX element type 'Modal' does not have any construct or call signatures. TS2604
The code is pretty boilerplate from the react-bootstrap website which works if I use javascript:
import React, { Component } from "react";
import Modal from 'react-bootstrap';
class InfoModal extends Component{
state = { show: true }
render(){
<Modal show={show} onHide={handleClose}>
<Modal.Header closeButton>
<Modal.Title>Modal heading</Modal.Title>
</Modal.Header>
<Modal.Body>Woohoo, you're reading this text in a modal!
</Modal.Body>
<Modal.Footer>
<Button variant="secondary" onClick={handleClose}>
Close
</Button>
</Modal.Footer>
</Modal>
}
}