skip to Main Content

Javascript – how to use buttons with the onClick method in the latest nextJS version 14.1.3

"use client" import React, { useState } from "react"; import { FaChevronLeft, FaChevronRight } from "react-icons/fa"; export default function HeroSlider() { const images = [ "/images/homepage/home-1.jpeg", "/images/homepage/home-2.jpg", "/images/homepage/home-3.jpg", "/images/homepage/home-4.jpg", "/images/homepage/home-5.jpg", "/images/homepage/home-6.jpg", "/images/homepage/home-7.jpg", ]; const [currentImageIndex, setCurrentImageIndex] = useState(0); const nextImage…

VIEW QUESTION
Back To Top
Search