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: mark event listeners inside loops as var props #7056

Open
wants to merge 1 commit into
base: build/v2
Choose a base branch
from

Conversation

Varixo
Copy link
Member

@Varixo Varixo commented Nov 10, 2024

If event handler is changing should be inside var props, because const props are ignored by vnodes. This is a case when we iterate over an items and return a jsx with an event listener.

closes #7032

@Varixo Varixo self-assigned this Nov 10, 2024
@Varixo Varixo requested a review from a team as a code owner November 10, 2024 14:25
Copy link

changeset-bot bot commented Nov 10, 2024

⚠️ No Changeset found

Latest commit: b81a91a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Nov 10, 2024

Open in Stackblitz

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@7056
npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@7056
npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@7056
npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@7056

commit: 03d517a

Copy link
Contributor

github-actions bot commented Nov 10, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 03d517a

@Varixo Varixo linked an issue Nov 10, 2024 that may be closed by this pull request
@wmertens
Copy link
Member

so my reservation is that if this is needed, we may need it always.

constProps are fixed references to possibly mutable objects. Maybe we should only mark deeply const props as constProps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

[🐞] v2: captured scope doesn't update in csr
2 participants