nextSlide = ({ target: { dataset: { step } } }) => {
this.setState(({ images: { length }, currentImageIndex: i }) => ({
currentImageIndex: Math.max(0, Math.min(length - this.props.slidesToShow, i + +step)),
}));
};
<button onClick={this.nextSlide} data-step="-1">PREV</button>
<button onClick={this.nextSlide} data-step="+2">NEXT</button>