I am trying to implement a react-slick in my index page to aid in scrolling(dealing with an overflow) and i keep getting error about the "render"

Viewed 28

I am trying to implement a react-slick in my index page to aid in scrolling(dealing with an overflow) and i keep getting the error: "Property 'render' in type 'VerticalMode' is not assignable to the same property in base type 'Component<{}, {}, any>'. Type '() => void' is not assignable to type '() => ReactNode'. Type 'void' is not assignable to type 'ReactNode'."

export class VerticalMode extends Component {
render() {
  const settings = {
    dots: true,
    infinite: true,
    slidesToShow: 3,
    slidesToScroll: 1,
    vertical: true,
    verticalSwiping: true,
    beforeChange: function(currentSlide, nextSlide) {
      console.log("before change", currentSlide, nextSlide);
    },
    afterChange: function(currentSlide) {
      console.log("after change", currentSlide);
    }
  };
0 Answers
Related