Trying to do slider on react

Ok, I want this behavior: when I click on my ‘row__button’, div ‘row__posters’ (on pic) should scroll right or left, no idea how to do this in react.

<button onClick={handleSlider} className="row__button">
  <ArrowBackIosIcon className="row__ArrowBackIosIcon" />
</button>

<div className="row__posters">..........</div>

const handleSlider = () => {
  {/*('.row__posters').scroll(100, 0)*/} //something like that lol
}

pic with slider

Leave a Comment