hello-pangea / dnd

Beautiful and accessible drag and drop for lists with React.
https://dnd.hellopangea.com
Other
2.06k stars 87 forks source link

Laggy drop behaviour on NextJS 13 (App dir) #696

Open rambaghdadi opened 10 months ago

rambaghdadi commented 10 months ago

Expected behavior

Smooth drop behaviour, it actually works perfectly in code sandbox

Actual behavior

Janky and laggy drop behavior on NextJS 13 (app dir), see video in demo section. Turning all the pages/components its related to into "use client" doesn't fix the issue.

What version of React are you using?

React 18.2 NextJS 13.5.4

What version of @hello-pangea/dnd are you running?

16.3.0

What browser are you using?

Chrome

Demo

https://github.com/hello-pangea/dnd/assets/46053089/d07f3dbb-8b55-47a5-b942-53255d5cc6a5

okayda commented 10 months ago

My DnD still works perfectly on version Next.js 13: '13.5.3'.

aniruddha-mithya commented 9 months ago

Do you mind sharing your next.js config here? Maybe one of the experiments is the issue?

I'm having a similar issue on react-sortable-hoc where similar inconsistent behaviour is seen with Nextjs but I've never had this issue with plain react before.

100terres commented 9 months ago

@rambaghdadi could you provide a reproduction of the issue your are facing with StackBlitz?