State not always up to date
maxired opened this issue · 1 comments
maxired commented
Hi,
I am trying to trace the root cause of ant-design/ant-design#38818 ,
and I believe this is related to rc-motion, either being buggy on react-18, or maybe misused.
Here is a sandbox where I can repo the issue
https://codesandbox.io/s/small-moon-nigikp?file=/src/App.js
Screen.Recording.2022-11-25.at.09.19.59.mov
as you can see, the element does not seems to end up in the state it is supposed to be, as sometimes Parent
is hovered, but child
is not visible
GaneshSrambikal commented
Maybe passing the dependencies in the useEffect would do the work