You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我正在公司的组件库中封装Menu组件,是基于rc-menu进行的二次封装。现在有个逻辑是:在MenuItem被选中时,它所属的SubMenu的空心icon需要切换到选中态的实心icon,我发现在SubMenu中无法获取到它下属的MenuItem是否有被选中的。我尝试`import {PathUserContext} from 'rc-menu/lib/context/PathUserContext',但在使用React.useEffect(PathUserContext)无法获取到值。请教下我该如何能实现上述的切换逻辑?