I am trying to get the exact DOM element in the ListItem of List using 'React.useRef(null);' but not able to get it, i am using below code
useEffect(() => {
//This is where i am trying to get the exact DOM element
console.log("listRef", listRef.current);
}, [searchText]);
Here is my codesandbox link
How to get exact DOM element and what am i missing?