Change8

@qwik.dev/router@2.0.0-beta.42

Breaking Changes
📦 qwikView on GitHub →
1 breaking5 features🔧 6 symbols

Summary

The `<ErrorBoundary>` component has been refactored and moved to `@qwik.dev/core` behind an experimental flag, with the `useErrorBoundary()` hook removed. Error handling and reporting in production have been improved.

⚠️ Breaking Changes

  • The `<ErrorBoundary>` component has moved to `@qwik.dev/core` and is now behind the experimental `errorBoundary` flag. The `useErrorBoundary()` hook has been removed.

Migration Steps

  1. If using `<ErrorBoundary>`, ensure it is imported from `@qwik.dev/core` and enable the `errorBoundary` flag.
  2. Remove any usage of the `useErrorBoundary()` hook.

✨ New Features

  • `fallback$` in `<ErrorBoundary>` now receives `(error, reset)` as arguments.
  • `onError$` in `<ErrorBoundary>` reports caught errors.
  • Production environments redact server-origin errors in `<ErrorBoundary>` to a generic message + digest, while client-origin errors render as thrown.
  • `renderToStream` reports a pre-flush `<ErrorBoundary>` catch via `onBeforeFirstFlush`.
  • The router now sends `Cache-Control: no-store` for pages with pre-flush `<ErrorBoundary>` catches and for error documents.

Affected Symbols