fix(core): undeprecate async useComputed - #8888
Conversation
🦋 Changeset detectedLatest commit: 6355446 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
🟡 Not ready to approve
The docs MDX introduces a broken TSX snippet (\_ identifier) and an extra trailing fenced code block delimiter that leaves an unclosed code fence at end-of-file.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR updates Qwik core and documentation to reflect that useComputed$ supports async functions again (supported in v2), removing the runtime deprecation warning and updating public-facing guidance.
Changes:
- Remove the async-
useComputed$deprecation warning path inrunComputed()(core runtime). - Update
useComputed$documentation (JSDoc + docs site content) to describe async behavior and tracking limitations. - Add a changeset and update generated API docs (
index.mdx/api.json).
File summaries
| File | Description |
|---|---|
| packages/qwik/src/core/use/use-task.ts | Removes async deprecation warning in computed execution and updates JSDoc wording. |
| packages/docs/src/routes/docs/(qwik)/core/state/index.mdx | Updates docs narrative about async useComputed$, but also modifies multiple embedded snippets. |
| packages/docs/src/routes/api/qwik/index.mdx | Updates generated API reference text for useComputed$. |
| packages/docs/src/routes/api/qwik/api.json | Updates generated API JSON content for useComputed$. |
| .changeset/async-computed-supported.md | Adds a patch changeset announcing async useComputed$ is no longer deprecated. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| <input | ||
| value={state.name} | ||
| onInput$={(_, el) => (state.name = el.value)} | ||
| /> | ||
| </> | ||
| ); | ||
| onInput$={(\_, el) => (state.name = el.value)} | ||
| /> |
| </CodeSandbox> | ||
| ``` |
| * The function must not have any side effects. It may return a promise, but only signal reads | ||
| * before the first await are tracked. Read reactive inputs before awaiting. |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
| <input | ||
| value={state.name} | ||
| onInput$={(_, el) => (state.name = el.value)} | ||
| /> | ||
| </> | ||
| ); | ||
| onInput$={(\_, el) => (state.name = el.value)} | ||
| /> |
it's supported in v2 now