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
The code inside useLayoutEffect and all state updates scheduled from it block the browser from repainting the screen. When used excessively, this makes your app slow. When possible, prefer useEffect.
Considering this, has anyone encountered performance issues due to useDroppable? Would moving state change to a useEffect compromise functionality? Thank you.
The text was updated successfully, but these errors were encountered:
The following line in useDroppable triggers a state change within a layout effect, leading to nested updates in React.
As per react docs:
You can observe the performance impact of altering state within a useLayoutEffect in this Codesandbox: https://codesandbox.io/p/sandbox/keen-mountain-scpydy-forked-tsk9sq?file=%2Fsrc%2Findex.js
Considering this, has anyone encountered performance issues due to
useDroppable
? Would moving state change to auseEffect
compromise functionality? Thank you.The text was updated successfully, but these errors were encountered: