In @reakitjs' Menu/Submenu, there's some Math to calculate the pointer movement so it doesn't close the submenu while you're trying to move to it in a non-straight line.
This is often overlooked in component libraries, but highly frustrating for users.
Thread...