@@ -12,20 +12,20 @@ That's about it. There's room to grow.
1212
1313---
1414
15- ## What Competitors Actually Capture
16-
17- | Feature | Sentry | Datadog | Bugsnag | Rollbar | LogRocket |
18- | --------------------------------| --------------------------------- | ------------------------ | --------- | --------- | ----- ---------|
19- | Component stack | Yes (linked via ` error.cause ` ) | Yes | Yes | Yes | No |
20- | Component names in breadcrumbs | Yes (Babel plugin) | Yes (context provider) | No | No | Click only |
21- | Component props/state | ** No** | ** No** | ** No ** | ** No ** | ** No ** |
22- | Redux/store state | Separate pkg | No | No | No | Separate pkg |
23- | React Router integration | v3-v7 + TanStack | Yes (RumRoute) | No | Manual | No |
24- | React 19 root error handlers | Yes | Yes | No | No | No |
25- | Component interaction trail | Via Babel annotations | Yes (context provider) | No | No | No |
26- | ` beforeCapture ` scope hook | Yes | No | No | No | No |
27- | User feedback dialog | Yes | No | No | No | No |
28- | Component profiling | Yes (mount/render/update spans) | No | No | No | No |
15+ ## Industry Landscape
16+
17+ | Feature | Industry standard | Flare |
18+ | --------------------------------| -------------------| ---------|
19+ | Component stack | Yes | Yes |
20+ | Component names in breadcrumbs | Some (via plugins) | No |
21+ | Component props/state | ** No** | ** No** |
22+ | Redux/store state | Some | No |
23+ | React Router integration | Some | No |
24+ | React 19 root error handlers | Emerging | No |
25+ | Component interaction trail | Rare | No |
26+ | ` beforeCapture ` scope hook | Rare | No |
27+ | User feedback dialog | Rare | No |
28+ | Component profiling | Rare | No |
2929
3030** Key finding: Nobody automatically captures component props or state.** Despite the theoretical possibility via React
3131fiber internals, every tool either ignores these or provides manual hooks. Reasons: serialization complexity (circular
@@ -40,32 +40,32 @@ refs, functions, React elements), performance cost of fiber tree traversal, and
40401 . ** Better component stack formatting and sourcemap-decoded display** -- currently just splitting by newline. Could
4141 parse into structured data (component name, file, line) for better Flare dashboard rendering.
4242
43- 2 . ** ` beforeCapture ` callback on ErrorBoundary** -- like Sentry's ` beforeCapture(scope, error, componentStack) ` . Lets
43+ 2 . ** ` beforeCapture ` callback on ErrorBoundary** -- a ` beforeCapture(scope, error, componentStack) ` hook . Lets
4444 users attach custom tags, component props, or state to the error before it's sent. This is the pragmatic answer to "
4545 how do we capture state" -- let the developer decide what to include.
4646
47473 . ** React 19 ` createRoot ` error handlers** -- provide a ` flareReactErrorHandler() ` function for the new
48- ` onCaughtError ` /` onUncaughtError ` /` onRecoverableError ` hooks. Only Sentry and Datadog support this today. Gets you
48+ ` onCaughtError ` /` onUncaughtError ` /` onRecoverableError ` hooks. Few tools support this today. Gets you
4949 error capture * without* requiring an ErrorBoundary wrapper.
5050
5151### Tier 2 -- Differentiating features (moderate effort)
5252
53- 4 . ** Component name annotation via build plugin** -- Sentry uses a Babel plugin to inject ` data-sentry-component ` and
54- ` data-sentry- source-file ` attributes onto DOM nodes at build time . These survive minification. Since Flare already
53+ 4 . ** Component name annotation via build plugin** -- inject component name and source file attributes onto DOM nodes at
54+ build time (e.g. ` data-flare-component ` , ` data-flare- source-file` ) . These survive minification. Since Flare already
5555 has ` @flareapp/vite ` , this could be a Vite plugin addition or a separate Babel plugin. Component names would then
5656 appear in breadcrumbs/glows.
5757
58585 . ** React Router integration** -- capture parameterized route names (` /users/:id ` instead of ` /users/12345 ` ) as
5959 context. Add navigation breadcrumbs on route changes. Support React Router v6/v7 and TanStack Router.
6060
61616 . ** State management integration** -- provide a Redux middleware and/or Zustand middleware that attaches store state
62- snapshots to error reports. Sentry does this with ` createReduxEnhancer() ` with ` stateTransformer ` for sanitization.
62+ snapshots to error reports. Use a ` stateTransformer ` for sanitization.
6363 This is where "capture state" actually becomes practical -- at the store level, not the component level.
6464
6565### Tier 3 -- Nice-to-have (higher effort)
6666
67- 7 . ** Component interaction breadcrumbs** -- like Datadog's ` RumComponentContextProvider ` , track which components the
68- user interacted with before the error. This gives a "user journey through components" trail.
67+ 7 . ** Component interaction breadcrumbs** -- track which components the user interacted with before the error. This gives
68+ a "user journey through components" trail.
6969
70708 . ** Component profiling** -- ` withProfiler() ` HOC / ` useProfiler() ` hook that tracks mount/render/update timing. Useful
7171 for correlating errors with performance, but requires a tracing infrastructure.
@@ -74,7 +74,7 @@ refs, functions, React elements), performance cost of fiber tree traversal, and
7474
7575## What's NOT Worth Pursuing
7676
77- - ** Automatic props/state via fiber internals** -- no competitor does this. Internal API instability across React
77+ - ** Automatic props/state via fiber internals** -- no tool does this reliably . Internal API instability across React
7878 versions, serialization nightmares, privacy risks, performance cost. The fiber tree (` memoizedProps ` , ` memoizedState ` )
7979 is unstable and undocumented.
8080- ** ` captureOwnerStack() ` ** -- React 19 API that returns ` null ` in production. Development-only, useless for error
@@ -88,7 +88,7 @@ refs, functions, React elements), performance cost of fiber tree traversal, and
8888For the ` @flareapp/react ` package specifically:
8989
90901 . ` beforeCapture ` callback on ` FlareErrorBoundary ` -- quick win, gives users control
91- 2 . React 19 ` createRoot ` error handler utility -- forward-looking, puts Flare ahead of Bugsnag/Rollbar
91+ 2 . React 19 ` createRoot ` error handler utility -- forward-looking, few tools support this yet
92923 . Structured component stack parsing -- better data for the Flare dashboard
93934 . Vite/Babel plugin for component name annotations -- builds on existing ` @flareapp/vite `
94945 . React Router integration (v6/v7)
0 commit comments