You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Qwik serializes the entire object even when capturing only a specific object property.
As described in https://qwik.dev/tutorial/understanding/capturing/, Qwik should narrowly serialize a listener's data based on the scope of what that listener closes over. For instance, an onClick$ event closing over a single property of a useStore should not serialize the entire useStore.
Load stackblitz link, run npm run dev OR npm run preview, and inspect the source of the preview window.
You will find 'PRETEND THIS IS A LARGE DATASET' serialized to the client.
Which component is affected?
Qwik Runtime
Describe the bug
Qwik serializes the entire object even when capturing only a specific object property.
As described in https://qwik.dev/tutorial/understanding/capturing/, Qwik should narrowly serialize a listener's data based on the scope of what that listener closes over. For instance, an onClick$ event closing over a single property of a useStore should not serialize the entire useStore.
You can observe this behavior in v2 as well:
https://qwikdev-build-v2.qwik-8nx.pages.dev/tutorial/understanding/capturing/
Reproduction
https://stackblitz.com/edit/github-s6wkde?file=src%2Fcomponents%2Fstarter%2Fcounter%2Fcounter.tsx
Steps to reproduce
Load stackblitz link, run
npm run dev
ORnpm run preview
, and inspect the source of the preview window.You will find 'PRETEND THIS IS A LARGE DATASET' serialized to the client.
System Info
Additional Information
This was discussed briefly in Discord:
https://discord.com/channels/842438759945601056/1275604997500960778
The text was updated successfully, but these errors were encountered: