Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 19 support: Migrate away from defaultProps #2580

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ashharrison90
Copy link

@ashharrison90 ashharrison90 commented Jun 3, 2024

Hi! Love the library ❤️

This PR migrates away from using defaultProps in connected-droppable and moves the default prop logic into droppable itself. This is because React 19 is removing support for defaultProps in functional components.

I've seen the maintenance notice in the repo and totally understand if you don't want to go forward with merging/releasing this. But I thought I'd raise it anyway since the scope of the changes is quite small and without it the library will no longer work for projects using React 19 without a custom npm/yarn patch applied on top.

Fixes #2563
Fixes #2576

edit: as pointed out by @jord1e in the comments, https://github.com/hello-pangea/dnd was a drop-in replacement for me. highly encourage you try switching over to that maintained library 🙏 i will leave this PR open in case there are use cases where it isn't a drop-in replacement

Copy link

atlassian-cla-bot bot commented Jun 3, 2024

Hooray! All contributors have signed the CLA.

@antoine-souesme
Copy link

Thank you for taking the time !

@cmhampton-meridian
Copy link

Hello everyone. Will this change be accepted? We are using this package and we will eventually have to replace it with something else if this is not updated. We happy with how this one works, so we would prefer to continue using it.

@lawrencenika
Copy link

got the same error saying defaultProps will be removed from memo components on my NextJS 14 project, looking forward to this merged soon! Thanks team for the hardwork!

@jb3
Copy link

jb3 commented Jul 10, 2024

Would love to see this accepted also! Really neat package and whilst I understand the maintenance notice it works perfectly for our use case and would not want to see things break over this change :)

@jord1e
Copy link

jord1e commented Jul 11, 2024

Would love to see this accepted also! Really neat package and whilst I understand the maintenance notice it works perfectly for our use case and would not want to see things break over this change :)

For my use case, this was a drop-in replacement:
https://github.com/hello-pangea/dnd

Just a structured find+replace of react-beautiful-dnd (and @types/react-beautiful-dnd) with @hello-pangea/dnd

I did it yesterday and the warning is gone, and also some other issues fixed automatically
Might be worth considering for everyone here

@ashharrison90
Copy link
Author

Would love to see this accepted also! Really neat package and whilst I understand the maintenance notice it works perfectly for our use case and would not want to see things break over this change :)

For my use case, this was a drop-in replacement: https://github.com/hello-pangea/dnd

Just a structured find+replace of react-beautiful-dnd (and @types/react-beautiful-dnd) with @hello-pangea/dnd

I did it yesterday and the warning is gone, and also some other issues fixed automatically Might be worth considering for everyone here

huh, was fully expecting this to take some amount of effort, but... you're right! also worked for me as a drop-in replacement 🥳

i will leave this PR open in case there are use cases where it isn't a drop-in replacement, but highly encourage everyone to give it a try 👍

@jord1e
Copy link

jord1e commented Jul 11, 2024

Would love to see this accepted also! Really neat package and whilst I understand the maintenance notice it works perfectly for our use case and would not want to see things break over this change :)

For my use case, this was a drop-in replacement: https://github.com/hello-pangea/dnd
Just a structured find+replace of react-beautiful-dnd (and @types/react-beautiful-dnd) with @hello-pangea/dnd
I did it yesterday and the warning is gone, and also some other issues fixed automatically Might be worth considering for everyone here

huh, was fully expecting this to take some amount of effort, but... you're right! also worked for me as a drop-in replacement 🥳

i will leave this PR open in case there are use cases where it isn't a drop-in replacement, but highly encourage everyone to give it a try 👍

I have been tracking your PR since it opened, so I am happy to have found out someone fixed it for us 😄

It wasn't even this ticket that led me to the other repository, pure chance haha

@antoine-souesme
Copy link

Would love to see this accepted also! Really neat package and whilst I understand the maintenance notice it works perfectly for our use case and would not want to see things break over this change :)

For my use case, this was a drop-in replacement: https://github.com/hello-pangea/dnd

Just a structured find+replace of react-beautiful-dnd (and @types/react-beautiful-dnd) with @hello-pangea/dnd

I did it yesterday and the warning is gone, and also some other issues fixed automatically Might be worth considering for everyone here

This worked like a charm, thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants