React 19 support: Migrate away from defaultProps
#2580
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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