1const scroll = (scrollOffset) => {
2 ref.current.scrollLeft += scrollOffset;
3};
4
5 <Row>
6 <Col>
7 <button onClick={() => scroll(-20)}>LEFT</button>
8 <button onClick={() => scroll(20)}>RIGHT</button>
9 </Col>
10 </Row>