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(v2): component rerender with the same key and different props #6208

Conversation

Varixo
Copy link
Member

@Varixo Varixo commented May 2, 2024

This PR fixes component rerender with the same key and different props

@Varixo Varixo changed the title fix(v2): component rerender with the same prop and different props fix(v2): component rerender with the same key and different props May 2, 2024
@@ -1046,8 +1046,8 @@ function propsDiffer(src: Record<string, any>, dst: Record<string, any>): boolea
if (!src || !dst) {
return true;
}
let srcKeys = removeChildrenKey(Object.keys(src));
Copy link
Member Author

Choose a reason for hiding this comment

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

in props we don't have children anymore, so I assume this is not needed now. Let me know if I am wrong

Copy link
Member

Choose a reason for hiding this comment

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

Right, the optimizer makes sure combined with _jsxC which checks at runtime.

However, the children prop can still be in the varProps, it should just be ignored

@mhevery mhevery merged commit 0ce434d into QwikDev:build/v2 May 3, 2024
16 of 20 checks passed
@Varixo Varixo deleted the build/v2-component-rerender-same-key-diff-props branch May 3, 2024 06:35
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.

3 participants