QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.85k stars 1.31k forks source link

fix(v2): only wrapped signal as a subscriber #6901

Closed Varixo closed 1 month ago

Varixo commented 1 month ago

Only WrappedSignal should be a subscriber. Signal and ComputedSingal shoudn't

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 7deeb87e055d3dc0b82814091ef6f9c772c31eba

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

pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

npm i https://pkg.pr.new/@builder.io/qwik@6901
npm i https://pkg.pr.new/@builder.io/qwik-city@6901
npm i https://pkg.pr.new/eslint-plugin-qwik@6901
npm i https://pkg.pr.new/create-qwik@6901

commit: 7deeb87

github-actions[bot] commented 1 month ago
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 7deeb87e055d3dc0b82814091ef6f9c772c31eba
Varixo commented 1 month ago

@Varixo we don't need extra tests for this? And is a ComputedSignal a WrappedSignal?

there is already a test for cleaning effectdependencies/subscribers. I wonder how we can test it more

And yes in JSX ComputedSignal is a WrappedSignal.

Maybe I am wrong and all signal should be a subscribers?

wmertens commented 1 month ago

nono, not all signals need to be subscribers.