On this page
  1. Install
  2. Compose it at the React root
  3. Provider properties
  4. Boundary properties
  5. Bridge boundary
  6. API entry points and requirements
  7. Peer dependencies

@playstack/errors-react

React context and resettable error boundaries for an existing Playstack error reporter.

Free. MIT licensed. Check preview availability before installing. See package access.

@playstack/errors-react connects an application-owned @playstack/errors reporter to React component trees.

Install

sh
npm install @playstack/core @playstack/errors @playstack/errors-react react

Compose it at the React root

tsx
import { ErrorsBoundary, ErrorsProvider } from '@playstack/errors-react'

export function ApplicationRoot() {
  return (
    <ErrorsProvider errors={errors}>
      <ErrorsBoundary
        fallback={({ error, reset }) => (
          <ErrorScreen error={error} onRetry={reset} />
        )}
        resetKey={router.location.key}
        development={import.meta.env.DEV}
        captureOptions={{ tags: { boundary: 'application-root' } }}
        onReset={() => queryClient.clear()}
      >
        <App />
      </ErrorsBoundary>
    </ErrorsProvider>
  )
}

useErrors() returns the exact reporter supplied to the closest provider, so event handlers and effects use the same capture policy as render boundaries.

Provider properties

PropertyTypeRequiredPurpose
errorsErrorReporterYesExisting reporter created by configureErrors.
childrenReactNodeNoThe subtree that can call useErrors or render a boundary.

Boundary properties

PropertyTypeRequiredPurpose
fallbackReactNode | ({ error, reset }) => ReactNodeYesApplication-owned recovery UI.
captureOptionsErrorCaptureOptionsNoSeverity, tags, context, identity, fingerprint, or trace metadata.
developmentbooleanNoRethrow after capture so a development overlay or parent boundary sees the error.
resetKeyunknownNoReset the boundary when its value changes according to Object.is.
onError(error, info) => voidNoIsolated diagnostic observer after capture.
onReset() => voidNoIsolated observer invoked when the boundary resets.
childrenReactNodeNoProtected component subtree.

Observer failures cannot replace the original render error or strand the fallback. A manual reset() and a resetKey change use the same recovery path.

Bridge boundary

This adapter has no separate persistence or transport bridge. Its only outside-in dependency is the ErrorReporter passed to ErrorsProvider; the fallback and reset behavior remain application components and callbacks.

The package does not configure drivers, initialize vendor SDKs, read ambient environment variables, or import a router. React 18 or 19 and all @playstack/* peers stay application-owned at the same fixed version.

API entry points and requirements

Reference snapshot: @playstack/errors-react@0.1.0-beta.1. Import only the entry point your runtime needs. Paths below are relative to the installed package; use Go to Definition in your editor to inspect exact parameters, return types and overloads. Do not import the declaration-file paths directly.

Public entry pointDeclaration file
@playstack/errors-react./dist/index.d.ts
@playstack/errors-react/errors./dist/errors.d.ts
@playstack/errors-react/package.jsonNo TypeScript declaration (asset or metadata export).

Node.js engine requirement: >=20. This is not a claim that every entry point works in browsers or Workers.

Peer dependencies

Keep existing framework versions that satisfy these ranges. Install optional peers only when using the corresponding adapter. The package manager resolves ordinary dependencies separately.

PeerCompatible rangeWhen needed
@playstack/core0.1.0-beta.1Required by the package.
@playstack/errors0.1.0-beta.1Required by the package.
react^18.2.0 || ^19.0.0Required by the package.

For a complete first program, start with Getting started. For API lookup and partial-example conventions, see Reading the reference. Provider failures, lifecycle requirements and application responsibilities remain described in the guide above; types alone do not establish production safety.

Go

Playstack Pro tag
OriginsPricingBlogNewsletterChangelogStatusRoadmap
ContributorsCommunityIn Use ShowcaseCase StudiesPartnersSponsors
FAQsSupportContact

© 2026 Playstack. All rights reserved.

With OSS
Terms of ServicePrivacy PolicyCookie PolicyImprint

By

Commune Software