react button click with argument

 <div className=“d-flex justify-content-between”>

<div>
<button type=“button” className=“btn btn-primary” onClick={() => handleBtnClick(‘-1’)}> &larr; Previous</button>
</div>
<div>
<button type=“button” className=“btn btn-primary” onClick={() => handleBtnClick(‘+1’)}>Next &rarr;</button>
</div>
</div>

Leave a Comment

Your email address will not be published. Required fields are marked *