Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
why is react slick with custome pages not working properly?

I'm having a hard time trying to get this to work. Fetching data from an API and trying to display the images using react slick but it's not working properly. Can someone tell me what's wrong? Any help is appreciated. This is the documentation: https://react-slick.neostack.com/docs/example/custom-paging

    const Product: React.FC = () => {
       const dispatch = useDispatch();
       const { id } = useParams();
    
       const product = useSelector(
          (state: RootState) => state.productReducer.product
       );
    
       useEffect(() => {
          dispatch(getProduct(id));
       }, [id, dispatch]);
    
       const settings = {
          customPaging: function (i: any) {
             return (
                <a>
                   <img src={`${product.images[i + 1]}`} alt="" />
                </a>
             );
          },
          dots: true,
          dotsClass: "slick-dots slick-thumb",
          infinite: true,
          speed: 500,
          slidesToShow: 1,
          slidesToScroll: 1,
       };
    
       return (
          <section className="product">
             <div className="bd-container product-container">
                <Slider {...settings}>
                   <div>
                      <img src={`${product.images[0]}`} />
                   </div>
                   <div>
                      <img src={`${product.images[1]}`} />
                   </div>
                   <div>
                      <img src={`${product.images[2]}`} />
                   </div>
                   <div>
                      <img src={`${product.images[3]}`} />
                   </div>
                </Slider>
             </div>
          </section>
       );
    };
    
    export default Product;
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!