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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qwik Optimizer (rust)
It seems that Symbols output are different when passing a "string" as a key. Which might affect reactivity when using signals within the component.
import type { PropsOf, QRL, Signal } from '@builder.io/qwik'; import { $, component$, Slot, useSignal, useTask$ } from '@builder.io/qwik'; export type ToggleProps = PropsOf<'button'> & { "halo"?: boolean; }; export const Toggle = component$<ToggleProps>((props) => { const { "halo": givenValueSig, ...buttonProps } = props; return ( <button type="button" {...buttonProps} class={props.class} > <Slot /> </button> ); }); export default component$(() => <Toggle>hello</Toggle>)
The symbol will convert to:
const { "halo": givenValueSig, ...buttonProps } = props;
However if the component look as follow:
import type { PropsOf, QRL, Signal } from '@builder.io/qwik'; import { $, component$, Slot, useSignal, useTask$ } from '@builder.io/qwik'; export type ToggleProps = PropsOf<'button'> & { halo?: boolean; }; export const Toggle = component$<ToggleProps>((props) => { const { halo: givenValueSig, ...buttonProps } = props; return ( <button type="button" {...buttonProps} class={props.class} > <Slot /> </button> ); }); export default component$(() => <Toggle>hello</Toggle>)
The symbol output looks as follow:
const buttonProps = _restProps(props, [ "halo" ]);
https://github.com/steffanek/qwik-ui/tree/pr-toggle-togglegroup
/packages/kit-headless/src/components/toggle/toggle.tsx
// 'bind:pressed': givenValueSig,
To quickly see the different symbol output see this playground: https://qwik.dev/playground/#f=Q0o0psbwRAOOlmpQEVpQ7J%2BmoxAY5KOjAKmB8aUheMSo6CClH6BOYEbQQVTiYCa4eCQmQYLdEpKfnp6TCnYPMBih7rJRhzRF1O0U1MCBqpSRmJOvZG%2BlkJQPrPcT88A%2BRI0IiEFAMxDus0Ey3E5DA9ysgccTRBeIBTPeClhWlqXmgSs%2BoH90wFJ6enoQt4BNAQrVAq0AmwR0AHpsQ1RCIwbkPVsliJASVKwa1bhaqDC4pWVbDTZWD8yByMDjGBTOsCiHt9OgUQ3EBLM4NCTsMkAJzkYfytMczdhDMGMDAA
System: OS: macOS 14.3 CPU: (8) arm64 Apple M3 Memory: 1.21 GB / 24.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.2.0 - /opt/homebrew/bin/node npm: 10.7.0 - /opt/homebrew/bin/npm pnpm: 9.7.0 - /opt/homebrew/bin/pnpm Browsers: Safari: 17.3 npmPackages: @builder.io/qwik: 1.7.3 => 1.7.3 @builder.io/qwik-city: 1.7.3 => 1.7.3 typescript: 5.4.5 => 5.4.5 undici: 5.28.4 => 5.28.4 vite: 5.2.11 => 5.2.11
No response
The text was updated successfully, but these errors were encountered:
Could offer a minimum duplicated ?
Sorry, something went wrong.
@JerryWu1234 What do you mean?
Could offer a minimum duplicated ? @JerryWu1234 What do you mean?
You offered a whole project, Could you provide the smallest reproducible repository?
@JerryWu1234 it's ok, Steff already provided the playground with the issue
So the _restProps is here
qwik/packages/qwik/src/core/state/store.ts
Lines 78 to 86 in 22f54c5
No branches or pull requests
Which component is affected?
Qwik Optimizer (rust)
Describe the bug
It seems that Symbols output are different when passing a "string" as a key.
Which might affect reactivity when using signals within the component.
The symbol will convert to:
However if the component look as follow:
The symbol output looks as follow:
Reproduction
https://github.com/steffanek/qwik-ui/tree/pr-toggle-togglegroup
Steps to reproduce
/packages/kit-headless/src/components/toggle/toggle.tsx
and uncomment line 39:// 'bind:pressed': givenValueSig,
To quickly see the different symbol output see this playground: https://qwik.dev/playground/#f=Q0o0psbwRAOOlmpQEVpQ7J%2BmoxAY5KOjAKmB8aUheMSo6CClH6BOYEbQQVTiYCa4eCQmQYLdEpKfnp6TCnYPMBih7rJRhzRF1O0U1MCBqpSRmJOvZG%2BlkJQPrPcT88A%2BRI0IiEFAMxDus0Ey3E5DA9ysgccTRBeIBTPeClhWlqXmgSs%2BoH90wFJ6enoQt4BNAQrVAq0AmwR0AHpsQ1RCIwbkPVsliJASVKwa1bhaqDC4pWVbDTZWD8yByMDjGBTOsCiHt9OgUQ3EBLM4NCTsMkAJzkYfytMczdhDMGMDAA
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: