File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -343,13 +343,13 @@ class ErrorBoundary extends React.Component {
343
343
}
344
344
345
345
static getDerivedStateFromError(error) {
346
- // 更新 state 使下一次渲染可以显示后备UI
346
+ // 更新 state 使下一次渲染可以显降级UI
347
347
return { hasError: true };
348
348
}
349
349
350
350
render() {
351
351
if (this.state.hasError) {
352
- // 你可以渲染任何自定义的后备UI
352
+ // 你可以渲染任何自定义的降级UI
353
353
return <h1>Something went wrong.</h1>;
354
354
}
355
355
@@ -389,7 +389,7 @@ class ErrorBoundary extends React.Component {
389
389
}
390
390
391
391
static getDerivedStateFromError(error) {
392
- // 更新 state 使下一次渲染可以显示后备UI
392
+ // 更新 state 使下一次渲染可以显示降级UI
393
393
return { hasError: true };
394
394
}
395
395
@@ -404,7 +404,7 @@ class ErrorBoundary extends React.Component {
404
404
405
405
render() {
406
406
if (this.state.hasError) {
407
- // 你可以渲染任何自定义的后备UI
407
+ // 你可以渲染任何自定义的降级UI
408
408
return <h1>Something went wrong.</h1>;
409
409
}
410
410
You can’t perform that action at this time.
0 commit comments