dnd
dnd copied to clipboard
Support react v18
Everything that need to be done in order to support react v18 will be tracked in this issue. You can also have a look at the React v18 milestone.
We are in the early stage of the investigation, so the list is not yet exhaustive. New issue will be added as we discover them.
- [x] https://github.com/react-forked/dnd/issues/319
- [x] https://github.com/react-forked/dnd/issues/318
- [ ] https://github.com/react-forked/dnd/issues/320
- [ ] https://github.com/react-forked/dnd/issues/317
Yes please!!
The work is in progress. I'll try to have something working as soon as possible :slightly_smiling_face:
That's awesome, thanks for the work!! Let me know if I can help with testing in a real-world project.
Would this include support for strict mode or should we create a new issue for that.
Currently using <React.StrictMode> with react 18 is not working.
Would this include support for strict mode or should we create a new issue for that.
@jacokok it feels like something we'll investigate separately. I'll open a new issue to see how we could support strict mode.
@jacokok I've updated the description of the issue to include strict mode support.
Would this include support for strict mode or should we create a new issue for that.
Currently using <React.StrictMode> with react 18 is not working.
Actually that was mainly what I was interested in. Good luck with the work!
The migration from Enzyme
to @testing-library/react
is going well. There is only one file to refactor. You can follow the progress here: https://github.com/react-forked/dnd/pull/323
I'll work start to work on Run test suite for react v16, v17 and v18 real soon :slightly_smiling_face:
The migration from Enzyme to @testing-library/react is done :heavy_check_mark:
Next step: Run test suite for react v16, v17 and v18 :slightly_smiling_face:
Any news on this ๐ we are blocked with our upgrading to react 18๐
~It's been a while. Any progress on this?๐~
For anyone want a dnd, stop waiting and try this https://github.com/clauderic/dnd-kit Not easy to use, but very powerful.
Any news?
Pretty the only reasonable choice is for one of us lurkers to finish the work here, or move to react-dnd...
~It's been a while. Any progress on this?๐~
For anyone want a dnd, stop waiting and try this https://github.com/clauderic/dnd-kit Not easy to use, but very powerful.
dnd-kit does not support touch. So no option
Pretty the only reasonable choice is for one of us lurkers to finish the work here, or move to react-dnd...
I think if someone had the ability to do this, it would have been done by now.
dnd-kit does not support touch. So no option
I tested it and it did support touch I am pretty sure. The issue I found was it also does not work in react strict mode yet. (So I did not want to migrate and just have the same issue)
I think if someone had the ability to do this, it would have been done by now.
It would be interesting to see if dnd-kit can solve the strict mode problem.
For now it will be amazing if we could get a beta release of this package with the react 18 packages fix so we can stop running npm --force
dnd-kit does not support touch. So no option
I tested it and it did support touch I am pretty sure. The issue I found was it also does not work in react strict mode yet. (So I did not want to migrate and just have the same issue)
I think if someone had the ability to do this, it would have been done by now.
It would be interesting to see if dnd-kit can solve the strict mode problem.
For now it will be amazing if we could get a beta release of this package with the react 18 packages fix so we can stop running npm --force
Well, I'm in strict mode and using dnd-kit without any problem; no console warnings and everything worked.
What's the issue you found?
What's the issue you found?
Honestly I did not test it with strict mode because I saw this issue. https://github.com/clauderic/dnd-kit/issues/775
Edit: Tested with strict mode and it works. Even on mobile with touch. Maybe it is time to call it and migrate.
@Toshinaki , the issue https://github.com/clauderic/dnd-kit/issues/775 is exactly the same as everyone (maybe except react-dnd?) on React 18. There are open issues, maintainer says "I'll get on to it", then nothing for many months. Obviously others aren't quite as bad as this repo in terms of silence from the maintainer but one of us is going to have to take responsibility here...
@AntonOfTheWoods I'm not interested in arguing about responsibility or something here. But I'm waiting for my dinner so I can explain myself a bit.
Some people like me don't care about what we use, but just want to get the work done. For my personal project, I was using react-beautiful-dnd and bothered with this issue, and this directed me here.
I asked for progress, but got no response. So I quitted waiting. I found dnd-kit, and it worked for my purpose, no errors nor warnings, so I recommended. End of the story.
It works for you, great, use it; not working? idc
I appreciate๐งก this and other open source great works, and that's all.
@Toshinaki , ok, sorry I missed that it's a drop-in replacement. That is very interesting! Having to reimplement most of the logic can make moving to another lib a massive hassle but if dnd-kit is just point to the new lib and "It Works!", then that is definitely awesome, thanks!
@Toshinaki , ok, sorry I missed that it's a drop-in replacement. That is very interesting! Having to reimplement most of the logic can make moving to another lib a massive hassle but if dnd-kit is just point to the new lib and "It Works!", then that is definitely awesome, thanks!
I migrated to dnd-kit. It was not a drop in replacement. It took me a bit longer than anticipated, but works really well.
Check out this comment https://github.com/atlassian/react-beautiful-dnd/issues/2399#issuecomment-1167427762 on getting this lib to work with strict mode.
I migrated to dnd-kit. It was not a drop in replacement. It took me a bit longer than anticipated, but works really well.
Im trying to do the same now and struggling with getting click events to work with dnd-kit.
Sorry for keeping you all waiting! :grimacing: I'm still trying to find the time to make it work, but as many of you might have notice it's not an easy fix... and it will take a lot of my free time (outside of work) to support react v18.
I still plan on making it work in the upcoming months, because I need this for a personal project and for work. But if you are in a rush to migrate your codebase to react v18 then I would suggest to not wait for react-forked/dnd to support the latest version of react and move to another library.
If anyone has the time to to do all the refactoring needed I'll be more then happy to review your pull request!
Sorry again and I hope you understand.
@100terres I'm using react-beautiful-dnd
for a few projects that required react 18 and I wasn't sure how progress was coming along so I forked your work and released @hello-pangea/dnd which supports react 18 and strict mode.
We needed our own fork so we could develop new features with a semi-regular cadence, and I intend to further develop the library there.
It would never have been possible without your truly amazing work on the original react-beautiful-dnd
. I cannot thank you enough for what you've accomplished here. And no worries on being caught up with life stuff, you don't owe anyone anything. I've certainly left some github issues open for much longer than I'd like before, it happens.
@100terres I'm using
react-beautiful-dnd
for a few projects that required react 18 and I wasn't sure how progress was coming along so I forked your work and released @hello-pangea/dnd which supports react 18 and strict mode.We needed our own fork so we could develop new features with a semi-regular cadence, and I intend to further develop the library there.
It would never have been possible without your truly amazing work on the original
react-beautiful-dnd
. I cannot thank you enough for what you've accomplished here. And no worries on being caught up with life stuff, you don't owe anyone anything. I've certainly left some github issues open for much longer than I'd like before, it happens.
It would have saved me a couple of very annoying days of work if you had posted about this work a couple of weeks ago!
It would have saved me a couple of very annoying days of work if you had posted about this work a couple of weeks ago!
Haha, timing could have been a bit better. Did you end up migrating to dnd kit? If so how do you like it compared to react beautiful dnd?
Hi all,
I've been watching this issue closely, and I would just like to add a few thoughts:
I am using react-beautiful-dnd for one of my projects, and maybe the most important reason I chose it is how natural the interactivity feels. This is best explained in Alex Reardon's blog post that introduces the library:
In react-beautiful-dnd a dragging item's impact is based on its centre of gravity โ regardless of where a user grabs an item from. A dragging items impact follows similar rules to a set of scales โ๏ธ.
This is a mechanic I feel like most other DND libraries get wrong, and something that's largely unique to RBDND. However, it seems that dnd-kit also implements the same behavior, if you play with their examples. So I am encouraged in that respect, in that I might be able to switch to dnd-kit without sacrificing a natural UX.
Of course, it would be great to see react-forked/dnd gain React 18 support, but in the interim, dnd-kit may prove to be a worthy alternative.
Of course, it would be great to see react-forked/dnd gain React 18 support, but in the interim, dnd-kit may prove to be a worthy alternative.
@caleb531 I created a fork of this which supports react 18 (it's like two comments up ๐)
@hello-pangea/dnd
https://github.com/hello-pangea/dnd
Haha, timing could have been a bit better. Did you end up migrating to dnd kit? If so how do you like it compared to react beautiful dnd?
@Xhale1 react-dnd. I found examples pretty close to what I needed so just went with that. I also found that the touch version actually works fine for the browsers I need on the desktop, so that made things a little simpler. I haven't actually pushed to prod yet though so might even just bite the bullet on that if yours works out of the box migrating from react-beautiful-dnd!
Hi @Xhale1
I'm using react-beautiful-dnd for a few projects that required react 18 and I wasn't sure how progress was coming along so I forked your work and released @hello-pangea/dnd which supports react 18 and strict mode.
Happy to see that you've managed to make it work with react 18! I'll have a look at what you did :slightly_smiling_face: Maybe you've found and fix the issue I was stuck on!
It would never have been possible without your truly amazing work on the original react-beautiful-dnd. I cannot thank you enough for what you've accomplished here.
It was a lot of late night coding, but it was really fun to do. I've learned so much by migrating the repo from Flow to TypeScript and more. Thank you for this recognition :slightly_smiling_face:
I might try reach you in the upcoming days!