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

[🐞] v2 - Signal read breaks toggling & asChild behavior #7406

Closed
thejackshelton opened this issue Mar 9, 2025 · 0 comments · Fixed by #7410
Closed

[🐞] v2 - Signal read breaks toggling & asChild behavior #7406

thejackshelton opened this issue Mar 9, 2025 · 0 comments · Fixed by #7410

Comments

@thejackshelton
Copy link
Member

Which component is affected?

Qwik Runtime

Describe the bug

When using the asChild prop on a component, specifically in prod, the checkbox breaks (indicator no longer shows and hides)

Not sure what asChild is? Read more about it here:

https://qwik.design/contributing/composition/#what-is-aschild

I think asChild makes a lot of sense to be part of the framework, as it is a powerful primitive that enables the ability for consumers to provide their own JSX. Currently, we need to create an inline component for each component that supports asChild.

Reproduction

https://github.com/thejackshelton/v2-repro-aschild/

Steps to reproduce

Reproduction steps:

  1. pnpm i && pnpm preview
  2. notice that the checkbox does not check or toggle, and there is an error from qwik core in the console

working behavior:

  1. run dev mode
  2. notice that it is toggling in dev mode

System Info

System:
    OS: macOS 15.1
    CPU: (16) arm64 Apple M4 Max
    Memory: 2.26 GB / 48.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.5.0 - /usr/local/bin/npm
    pnpm: 9.5.0 - /usr/local/bin/pnpm
    bun: 1.1.7 - ~/.bun/bin/bun
  Browsers:
    Safari: 18.1
  npmPackages:
    typescript: 5.4.5 => 5.4.5 
    undici: * => 7.4.0 
    vite: 5.3.5 => 5.3.5

Additional Information

No response

@thejackshelton thejackshelton added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Mar 9, 2025
@thejackshelton thejackshelton changed the title [🐞] v2 - asChild behavior breaks component state in production only [🐞] v2 - context state change breaks toggling & asChild behavior Mar 9, 2025
@thejackshelton thejackshelton changed the title [🐞] v2 - context state change breaks toggling & asChild behavior [🐞] v2 - Context state change breaks toggling & asChild behavior Mar 9, 2025
@thejackshelton thejackshelton changed the title [🐞] v2 - Context state change breaks toggling & asChild behavior [🐞] v2 - signal read breaks toggling & asChild behavior Mar 9, 2025
@thejackshelton thejackshelton changed the title [🐞] v2 - signal read breaks toggling & asChild behavior [🐞] v2 - Signal read breaks toggling & asChild behavior Mar 9, 2025
@Varixo Varixo added COMP: runtime VERSION: upcoming major and removed STATUS-1: needs triage New issue which needs to be triaged labels Mar 10, 2025
@Varixo Varixo linked a pull request Mar 10, 2025 that will close this issue
@Varixo Varixo closed this as completed Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants