Skip to content
Back to skills

Qwik Knowledge Patch

ASecurity

Qwik

  • 25 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
developmentgoreactapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill qwik-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Qwik Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Qwik Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-qwik-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-qwik-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: qwik-knowledge-patch
description: Qwik
version: "1.19.0"
license: MIT
metadata:
  author: Nevaberry
---


# Qwik Knowledge Patch

Load this skill when migrating Qwik code or working on builds, reactive state,
async rendering, JSX, serialization, routing, and server behavior.
Use the topic references for complete guidance and the version-specific details
attached to each change.

## Reference index

| Reference | Topics |
| --- | --- |
| [Build, Vite, and Assets](references/build-vite-and-assets.md) | Bundlers, transforms, output paths, manifests, preloads, service workers, HMR, CLI integrations |
| [JSX, Events, and Serialization](references/jsx-events-and-serialization.md) | Event casing, capture/passive listeners, runtime containers, attributes, prop types, serialization, locale, MDX |
| [Migration and Packages](references/migration-and-packages.md) | Router package rename, ESM, library compatibility, build constants, experimental Insights |
| [Reactivity and Async Computations](references/reactivity-and-async.md) | Computed signals, polling, Suspense, Reveal, Show, error boundaries, task cleanup, stores, workers |
| [Router and Server Behavior](references/router-and-server.md) | Loader requests and caching, errors, SSG, heads, navigation, middleware, adapters, validation, mocks |

## Breaking changes and deprecations

### Packages and bundler configuration

- In v2, Qwik City becomes Qwik Router: change `@builder.io/qwik-city`
  imports to `@qwik.dev/router`.
- In v2 beta.14, Qwik drops CommonJS and UMD builds. Switch tooling that loads
  Qwik with `require()` to ESM imports.
- In v2 beta.40, Qwik requires Vite 8 and Rolldown. Migrate custom
  `output.manualChunks` rules to `output.codeSplitting.groups`.
- In v2 beta.38, Qwik's handling of Vite's `build.assetsDir` was removed.
  Set the bundler's `output.assetFileNames` to relocate built assets.
- In v2 beta.37, the client build rejects server-only modules. Keep their imports
  in server code.

### Computed signals and error boundaries

In v2 beta.38–41, use `useComputed$` or `createComputed$` for async computations.
Beta.41 removes `useAsync$` and `createAsync$`; the v2 beta line deprecates
`useResource$` and `<Resource>`.

In v2 beta.39, replace `allowStale: false` with explicit `.clear()` to discard
the current value. Move computed scheduling out of `expires`, `poll`, or
`interval` and into `usePoll` from `@qwik.dev/utils`.

In v1.10, async `useComputed$` callbacks are deprecated because reads after the
first `await` escape dependency tracking. Use `useResource$` for async data or
`useTask$` with explicit tracking to update a signal.

In v2 beta.42, replace the removed `useErrorBoundary()` hook with `ErrorBoundary`
from `@qwik.dev/core`. Enable `experimental: ['errorBoundary']` in `qwikVite`.
`fallback$` receives `(error, reset)`; `onError$` reports catches.

### Router loader migration

- In v2 beta.37, remove `q-data.json` cache rules. SPA navigation requests
  individual `q-loader-${hash}.${manifestHash}.json` resources; a new build
  changes their URLs through the manifest hash.
- In v2 beta.39, replace `expires` and `poll` on `routeLoader$` with
  `cacheControl`. Every navigation requests loader data through the browser
  cache; unchanged responses leave the current render intact.
- In v2 beta.37–38, loader hooks return async signals: thrown errors are available
  on `.error`, and reading `.value` rethrows them. From beta.38, returning
  `fail()` sets a loader value with a `failed` field.
- In v2 beta.37, move action-state reads out of `routeLoader$`. Read the action
  signal in the component or have the action update URL state that the loader reads.
- In v2 beta.37, update page and loader `cacheKey` callbacks to
  `(requestEv: RequestEvent, eTag: string)`; read path or status from the event.

### Removed and renamed options

- In v2 beta.33, remove `preloads.ssrPreloadProbability`,
  `preloads.preloadProbability`, `preloads.debug`, and the legacy service worker
  `prefetchStrategy` from `renderToStream` options.
- In v2 beta.41, remove imports from `@qwik.dev/router/service-worker`.
  `setupServiceWorker` has no effect in v2.
- In v2 beta.38, rename `Link`'s `prefetchBundle` prop to `prefetchBundles`.
- In v2 beta.36, remove experimental opt-ins for `usePreventNavigate$` and
  `request.rewrite()`; both APIs are enabled by default.
- In v1.13, the `eagerness` option on `useTask$` is deprecated for the v2 migration.

## Async rendering and reactive state

### Async computation and Suspense

The v2 beta.38–41 compute context provides `track()`; `clientOnly: true` skips
SSR computation. A synchronous compute error populates `.error` and rethrows
on `.value` reads.

```tsx
const result = useComputed$(async ({ track }) => {
  const url = track(() => endpoint.value);
  return (await fetch(url)).json();
}, { clientOnly: true });
```

Enable `<Suspense>` with `qwikVite({ experimental: ['suspense'] })`
(v2 beta.35–39). Client rendering applies the configured fallback delay.
As of beta.39, the fallback appears only during initial loading and `showStale`
is removed. Out-of-order Suspense streaming is experimental as of beta.36.

Experimental `Reveal` coordinates sibling `Suspense` boundaries with `parallel`,
`sequential`, `reverse`, or `together` ordering (v2 beta.35). Use `collapsed` to
hide pending boundaries waiting for their turn.

### Error behavior during rendering

In v2 beta.42, production replaces server-origin errors with a generic message
and digest, including when serializing errored async signals. Client-origin
errors render as thrown.

If an error boundary catches before the first SSR flush, `renderToStream` reports
the catch via `onBeforeFirstFlush` (v2 beta.42). The router sends
`Cache-Control: no-store` for those pages and error documents.
In v2 beta.43, static generation marks a route as failed when `<ErrorBoundary>`
catches during prerendering, even if the boundary renders a fallback.

### Signal reads and notifications

In v2 beta.24, `signal.untrackedValue` reads without subscribing and allows an
assignment without immediately notifying subscribers. Call `signal.trigger()`
after that assignment or after mutating an object in place without changing
its identity to notify subscribers.

In v1.19, `untrack` accepts signals and stores directly: `untrack(count)` or
`untrack(store)`. Its callable form forwards arguments:
`untrack((state) => state.count, store)`.

In v1.18, a computed signal notifies subscribers only when its computed value
changes; recomputation can leave subscribers untouched.

### Task lifecycle

In v2 beta.18–36, `useTask$` and `useVisibleTask$` await a promise returned by
cleanup before starting their next invocation. `render()` resolves independently
of `useVisibleTask$`, which runs after the flush. On resume, visibility-triggered
tasks wait for visibility; during client-only rendering, they do not wait.

In v1.18, calling `cleanup()` on the result of `render()` runs cleanup callbacks
throughout the rendered component tree.

## Routing and caching

### Loader inputs and background work

In v2 beta.37, use `search` on `routeLoader$` to declare which query parameters
the loader receives and re-runs for. With `search` omitted, the default
`qwikRouter({ strictLoaders: true })` gives the loader no query parameters;
`strictLoaders: false` passes all of them through.

In v2 beta.38, enable the experimental `blockSSR` flag and set `blockSSR: false`
on individual loaders to allow them to run in the background. Give each loader
created through the same shared wrapper a distinct `id`; the wrapper can yield
the same optimizer-assigned ID for multiple loaders.

### Request control flow and middleware

In v2 beta.38, returning `ev.redirect()`, `ev.error()`, or `ev.rewrite()` in a
request handler, loader, action, or server function has the same effect as
throwing it. Passing an absolute URL to `rewrite()` produces HTTP 400 as of beta.26.

Use `RequestEvent.internalRequest` to identify framework JSON requests
(v2 beta.37–39). Loader requests go through page middleware; same-path `index.*`
middleware applies only to loaders defined in that index module. Loader-originated
redirects travel in the JSON response. Beta.39 enforces blocking loader guards
on those requests and runs server-function requests outside route middleware.

### Page response caching

In v2 beta.29–37, define a page `eTag` to return 304 on a match before rendering,
or supply `cacheKey` to cache rendered HTML in memory. Clear that cache with
`clearSsrCache()` from the request-handler middleware. As of beta.37, with
`cacheKey` alone, the router hashes cached HTML to produce an ETag for subsequent
requests.

## Build and deployment quick reference

In v2 beta.12 and beta.35–36, import `getClientManifest` from `@qwik.dev/core`
instead of `@qwik-client-manifest`. For a nonstandard SSR manifest location, use
`qwikVite({ ssr: { manifestInputPath: 'dist/client/q-manifest.json' } })`.

In v2 beta.28, use `vite build --app` to build multiple Vite environments
together. Router adapters with a separate Vite configuration still need their
own `build.server` run. Set `qwikVite({ devTools: { hmr: false } })` for full-page
reloads instead of state-preserving HMR.

When the Vite plugin reports a Qwik library as external, add it to
`ssr.noExternal` (v2 beta.9–33). The plugin checks this during build; dependency
auto-detection reads `package.json` files upward from the Vite root, including
workspace-root dependencies in a monorepo.

From v1.16.1, Qwik City preserves service workers with custom logic. To retire a
prefetch-only worker, remove `service-worker.ts` files and keep
`<ServiceWorkerRegister />` mounted while returning users still need the old
worker removed. See the build reference for module preloading, associated cache
removal, and custom-worker scaffolding.

Files in this skill

  • SKILL.md7.4 KB
  • coverage.json961 B
  • references/build-vite-and-assets.md3.8 KB
  • references/jsx-events-and-serialization.md1.6 KB
  • references/migration-and-packages.md1.5 KB
  • references/reactivity-and-async.md1.6 KB
  • references/router-and-server.md2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.