I have installed the bootstrap through yarn :
yarn Add Bootstrap@4.2.1
And include it in index.js file:
import "bootstrap/dist/css/bootstrap.css"
here I uses the collapse component through snipped:
<div>
<p>
<a className="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
a
</a>
<button className="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
b
</button>
</p>
<div className="collapse" id="collapseExample">
<div className="card card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
</div>
</div>
</div>
but when I clicked a or b buttons nothing happens.
how can I solve it?