boundary@1.0.1
Provides boundary functions, (upper-bound and lower-bound).
2014-12-27
安装 (1.0.1)
npm install boundary@1.0.1
yarn add boundary@1.0.1
pnpm add boundary@1.0.1
bun add boundary@1.0.1
devDependencies (10)
| 包名 | 版本要求 |
|---|---|
| gulp | ^3.8.10 |
| gulp-6to5 | ^1.0.2 |
| gulp-bump | ^0.1.11 |
| gulp-espower | ^0.10.0 |
| gulp-filter | ^2.0.0 |
| gulp-git | ^0.5.5 |
| gulp-mocha | ^2.0.0 |
| gulp-sourcemaps | ^1.2.8 |
| gulp-tag-version | ^1.2.1 |
| power-assert | ^0.10.0 |
相关教程
React 中错误边界无法捕获异步错误
Error Boundary 只捕获渲染生命周期中的错误不捕获 setTimeout、Promise.then 和事件处理中的错误。需要加 try/catch 手动处理。
React 中 componentDidCatch 捕获错误日志
componentDidCatch(error, info) 在 Error Boundary 中捕获渲染错误并记录错误信息和组件栈。配合日志上报系统可以在线上环境追踪前端错误。
React 错误边界 Error Boundaries 捕获渲染时的错误
React 组件渲染过程中抛出的错误如果不捕获整个应用会白屏。Error Boundary 可以捕获子组件的渲染错误并展示降级 UI。class 组件的 componentDidCatch 或第三方库 react-error-boundary 都可以实现。本文给出两种方式的示例代码。