https://stackblitz.com/edit/react-slider-slickgoto has a Menu with 3 options and selecting each option will display its subcategories on the slider. Option 1 has 3 slides and Option 2 and 3 have 2 slides.
I am using slick.current.slickGoTo(0) inside the useEffect to display the first slide when the user clicks on any of the 3 Menu options. My issue arises when the user is in the First slider which has 3 slides and the current slide is 3. Now if the user clicks on the second or third Menu option, instead of showing the first slide for the selected Menu option it shows the last slide of the selected option.