Skip to content

Fix component as props used in the same container getting the same key #3284

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

Merged
merged 3 commits into from
Apr 17, 2025

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Apr 17, 2025

When a component as prop is rendered with the same react key and rendered inside the same container, (eg: https://github.com/mantinedev/mantine/blob/87639c2b706884f9809fe1f68dc7a6cbe74abfe3/packages/%40mantine/core/src/components/Switch/Switch.tsx#L224) it will not re-render. This PR change the key to always be the component path which is unique in all cases.

@T4rk1n T4rk1n merged commit 17fca44 into dev Apr 17, 2025
3 checks passed
@T4rk1n T4rk1n deleted the fix-cop-key branch April 17, 2025 20:36
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.

2 participants