Why can't the subscript be taken in a situation like react?

![] [1]

as shown above

Aug.27,2021

this k should be k of the above array loop. You add a parameter to this onMouseEnter . Here k is the default event object event . Just remove k after onMouseEnter .

onMouseEnter={()=>console.log(k)}
Menu