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

Laravel Livewire @script

I have this button in the blade file of a livewire component: <button type="button" title="Adauga o disciplina noua" class="ml-2 my-auto bg-blue-500 text-white px-2 py-1 rounded-lg" onclick="adaugaSelect()">+</button> and the function: ` @script <script> function adaugaSelect() { } </script> @endscript` And in…

VIEW QUESTION
Back To Top
Search