Integrations
Wire ScaleBun into React, Next.js, Vue, Svelte, Angular, or plain JavaScript — usually the first thing you do after installing, and a few lines in each case.
@scalebun/web is framework-agnostic and works on its own. The adapters exist
because every framework hides exactly two things from a generic browser SDK:
| Seam | Why the core can't see it | What the adapter does |
|---|---|---|
| Route change | history events carry a URL, not the route name or pattern your router knows | Calls ScaleBun.trackScreen(name) |
| Render error | React, Vue and Angular catch render errors before window.onerror ever fires | Calls ScaleBun.captureError(err, { componentStack }) |
That is the whole contract. Adapters add no capture logic of their own, and they re-export the singleton so you can import everything from one package.
Pick your framework#
What each adapter gives you#
| Package | Peer | Route tracking | Render errors |
|---|---|---|---|
@scalebun/web-react | react >=17 | useRouteName(name) | <ScaleBunErrorBoundary> |
@scalebun/web-next | next >=14, react >=18 | Automatic via <ScaleBunNavigation /> | app/error.tsx + instrumentation.ts |
@scalebun/web-vue | vue >=3 | useRouteName(refOrGetter) | Automatic via the plugin |
@scalebun/web-svelte | svelte >=4 | trackNavigation(nav) | handleError hooks |
@scalebun/web-angular | @angular/core >=16, @angular/router >=16, rxjs >=7 | Automatic via provideScaleBun() | Automatic via ErrorHandler |
Server-side rendering#
Every adapter guards init() with typeof window, so calling it during SSR is
safe and does nothing — capture starts on the client after hydration. Server and
edge runtimes are a separate story with their own capture path: see
SSR & edge runtimes.
Next#
Install & initialize — the core setup adapters build on.
Errors & crashes — what
captureErrorrecords.