2023-04-26

Something's wrong with react 18 useEffect. React17 useEffect functions well [closed]

https://codesandbox.io/p/sandbox/recursing-goldwasser-fde16r?selection=%5B%7B%22endColumn%22%3A37%2C%22endLineNumber%22%3A4%2C%22startColumn%22%3A37%2C%22startLineNumber%22%3A4%7D%5D&file=%2Fpages%2Findex.js

Referring to the above codesandbox, the scrollup menu works well in react 17 but the transition does not appear in react 18. Problem is possibly with useEffect. What is the problem?

I tried on React 17 and React 18. In react 17 the scroll up transition display correctly, but in react 18 the scroll up transition is missing.

https://codesandbox.io/p/sandbox/dreamy-resonance-hdosok This is the problem in react 18. Is there any workaround to change back the behaviour of react 17 or how to keep the component structure while making the behaviour of react 17?

https://github.com/websummernow/ReactBehaviours



No comments:

Post a Comment