Reputation: 519
I use the Modal
component exactly as shown in the react-bootstrap
docs but I get the error Property 'show' does not exist on type 'IntrinsicAttributes & [...]'
<Modal show={props.showModal} onHide={props.handleCloseModal}>
<Modal.Header closeButton>
<Modal.Title>Seleccionaste la opcion:</Modal.Title>
</Modal.Header>
<Modal.Body>
[...]
Upvotes: 2
Views: 859
Reputation: 519
After digging in node_modules/react-bootstrap/esm/Modal.d.ts
I found that effectively show
doesn't exist on the type definitions for react-bootstrap@^1.3.0
(weird because is the latest version according to the official website and even the docs tell you to use that prop).
So my solution was to install @types/react-bootstrap
where the show
props was definitely included. That solved my problem!
Upvotes: 1