In my React project, I am developing a mega-menu styled dropdown navigation. As a functional component, I am utilizing the useState
hook to manage the state and control the display of sub-navigation items.
The functionality of the dropdown is operational, but there is an issue when users hover over a 'sub-menu' item and try to move across to another 'sub-menu' - it disappears. I am seeking suggestions on how to maintain visibility of the 'sub-menu' items as users navigate through all sub-navigation options.
For further context, here is the link to the codepen.