perf(react-router): direct export of CatchBoundary class component, remove function wrapper - #8068
Conversation
… remove function wrapper
|
View your CI Pipeline Execution ↗ for commit fb35c8e
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview4 package(s) bumped directly, 19 bumped as dependents. 🟩 Patch bumps
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesCatchBoundary export
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change directly exports the CatchBoundary class component and removes its function wrapper; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
Merging this PR will degrade performance by 12.56%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Memory | mem server error-paths not-found (vue) |
2,190.4 KB | 485.6 KB | ×4.5 |
| ⚡ | Simulation | client-mount loop (react) |
129.2 ms | 119.3 ms | +8.27% |
| ⚡ | Memory | mem server server-fn-churn (react) |
395.7 KB | 376.3 KB | +5.16% |
| ⚡ | Simulation | client-search-params navigation loop (react) |
177 ms | 169.6 ms | +4.36% |
| ⚡ | Memory | mem client navigation-churn (vue) |
1.7 MB | 1.6 MB | +4.33% |
| ⚡ | Simulation | ssr control-flow route headers (react) |
308.5 ms | 299.2 ms | +3.12% |
| 👁 | Memory | mem server error-paths redirect (vue) |
419.3 KB | 473.7 KB | -11.48% |
| 👁 | Memory | mem server peak-large-page (vue) |
1,010.6 KB | 1,097.6 KB | -7.93% |
| 👁 | Memory | mem server server-fn-churn (vue) |
325.3 KB | 4,856.3 KB | -93.3% |
| 👁 | Memory | mem server error-paths unmatched (react) |
415.8 KB | 777.8 KB | -46.54% |
| 👁 | Memory | mem server error-paths not-found (solid) |
584.7 KB | 567.4 KB | +3.05% |
| 👁 | Memory | mem server error-paths redirect (solid) |
370.1 KB | 392.8 KB | -5.78% |
| 👁 | Simulation | client-side navigation loop (react) |
126.8 ms | 142.9 ms | -11.26% |
| 👁 | Simulation | client-async-pipeline navigation loop (react) |
100.1 ms | 107.3 ms | -6.67% |
| 👁 | Simulation | client-links navigation loop (react) |
295.6 ms | 308 ms | -4.01% |
| 👁 | Memory | mem client unique-location-churn (vue) |
487.9 KB | 530.2 KB | -7.97% |
| 👁 | Memory | mem client navigation-churn (solid) |
677 KB | 793.3 KB | -14.66% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing bundle-react-router-direct-export-class-catchboundary-component (fb35c8e) with main (bdaf73a)
…hboundary-component
minor change to reduce bundle size.
technically not exactly the same at runtime, but for all intents and purposes it should be equivalent.
Summary by CodeRabbit
New Features
CatchBoundaryis now directly available as a React class component, providing a more consistent integration option for applications using React Router.Bug Fixes
Documentation
CatchBoundaryexport.