Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(cn): translate content/docs/error-boundaries.md into Chinese #153
docs(cn): translate content/docs/error-boundaries.md into Chinese #153
Changes from 15 commits
3ad3ca2
977864a
4e41c5a
3b79d55
22d69b7
afeecc9
0e43012
6cd5997
f9d53a0
ef7eb85
00785b7
3340234
af078f8
67a2538
914d358
42a1046
4f0d367
2b2286e
53b869f
1021f95
ef754ff
cc86807
a98f307
b3445ae
3fa6ef5
376b9a3
a602b30
57eb16d
45519d8
7bd65c2
76b5e0d
8664ea0
bf9fb8a
673c433
ae13c1a
0d59fa3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这句话理解有点问题。
第一句话找出主干,Error boundaries are components。剩下的都是定语。错误边界是一种 React 组件。
错误边界是一种 React 组件,这种组件可以捕获并打印发生在其子组件树任何位置的 JavaScript 错误,并且,它会渲染出备用 UI,而不是渲染那些崩溃了的子组件树。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原文的意思不是说“错误边界不会使整个组件崩溃”。而是使用错误边界可以不去渲染那些崩溃的组件。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已做修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉前半句不太通顺,看看有没有其他好的表达方式?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
比如这样?
React 15 中有一个支持有限的错误边界的方法
unstable_handleError
。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已做修改。