Hello I'm trying to find a way to make a next button in react to get next video, by selecting the next dom element in my list. HTMLCollection(3) [li.video-item.item, li.video-item.item, li.video-item.item] this is what I get in console, from a function I made:
const handleNext = (event) => {
let listItems = document.getElementsByClassName("video-item")
console.log(listItems);
}
problem is I just want the next element and make it click with a "next button" Im creating.
Thx