We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qwik Runtime
Looks like the 'key' attribute is lost in serialization. Check out this small example:
export const Item = component$((props) => { return <div>Item #{props.index}</div>; }); export default component$(() => { const list = [1,2,3].map(idx => <Item index={idx} key={idx} />); console.log(list.map(it => it.key).join(",")); useVisibleTask$(() => { alert(list.map(it => it.key).join(",")); }); return <div>{list}</div>; });
I would expect the console.log and alert outputs to match, but the keys are missing on the browser's end.
https://stackblitz.com/edit/qwik-starter-wpq63x?file=src%2Froutes%2Findex.tsx
No response
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.18.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.4.2 - /usr/local/bin/npm pnpm: 8.10.5 - /usr/local/bin/pnpm npmPackages: @builder.io/qwik: ^1.2.11 => 1.2.11 @builder.io/qwik-city: ^1.2.11 => 1.2.11 undici: 5.22.1 => 5.22.1 vite: 4.4.7 => 4.4.7
The text was updated successfully, but these errors were encountered:
Good catch and beautiful reproduction showing the problem. Wish everyone did that.
Any chance I could get you to create a fix. The issue is here: https://github.com/BuilderIO/qwik/blob/main/packages/qwik/src/core/container/serializers.ts#L427-L431
Sorry, something went wrong.
fix(component): serialize the 'key' attribute of JSX nodes
078b58e
Added serialization and deserialization of the 'key' attribute, the only member of JSXNodeImpl which was not serialized thus far. Issue QwikDev#5496
fix(core): serialize the 'key' attribute of JSX nodes (#5501)
bba73dc
Adds serialization and deserialization of the 'key' attribute, the only member of JSXNodeImpl which was not serialized thus far. Issue #5496
Successfully merging a pull request may close this issue.
Which component is affected?
Qwik Runtime
Describe the bug
Looks like the 'key' attribute is lost in serialization. Check out this small example:
I would expect the console.log and alert outputs to match, but the keys are missing on the browser's end.
Reproduction
https://stackblitz.com/edit/qwik-starter-wpq63x?file=src%2Froutes%2Findex.tsx
Steps to reproduce
No response
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: