-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
base: master
Are you sure you want to change the base?
React 19 support: Migrate away from defaultProps
#2580
Conversation
Hooray! All contributors have signed the CLA. |
Thank you for taking the time ! |
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. |
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! |
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: Just a structured find+replace of I did it yesterday and the warning is gone, and also some other issues fixed automatically |
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 |
This worked like a charm, thank you ! |
Hi! Love the library ❤️
This PR migrates away from using
defaultProps
inconnected-droppable
and moves the default prop logic intodroppable
itself. This is because React 19 is removing support fordefaultProps
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