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

fix: do not spread key on render props #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kris-ellery
Copy link
Member

Should fix #288

renderThumb: props => <div {...props} />,
renderTrack: props => <div {...props} />,
renderMark: props => <span {...props} />,
renderThumb: ({ key, ...props }) => <div key={key} {...props} />,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch👍

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed my issue! thanks!

@msf-caesar
Copy link

Try with passing the key as a prop directly to the render prop component instead of spreading it.

@Lukaskaras
Copy link

@kris-ellery Is there any update on this?

@vigenere23
Copy link

Is this fix still working? @m1nsuplee Does your review count as an approval?

@shubhankartrivedi
Copy link

Is this fix still working? @m1nsuplee Does your review count as an approval?

fix is still working

@vigenere23
Copy link

fix is still working

Does that mean any of you has the power to approve and/or merge this PR? If not, should the appropriate person be notified?

@shubhankartrivedi
Copy link

fix is still working

Does that mean any of you has the power to approve and/or merge this PR? If not, should the appropriate person be notified?

yes they should be notified

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

Successfully merging this pull request may close these issues.

React 18.3: A props object containing a "key" prop is being spread into JSX
6 participants