-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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/warnings/dont-call-proptypes.md into Chinese #115
Conversation
Deploy preview for cn-reactjs ready! Built with commit 649991f |
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.
LGTM
没什么大问题,有个错别字修下就行
|
||
In a future major release of React, the code that implements PropType validation functions will be stripped in production. Once this happens, any code that calls these functions manually (that isn't stripped in production) will throw an error. | ||
在 React 未来的主要版本(major release)中。执行 PropType 校验函数的代码应该从生成环境中剥离。此时,任何手动调用这些函数的代码(还没从生产环境中剥离的)都会产生报错。 |
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 未来的主要版本(major release)中。执行 PropType 校验函数的代码应该从生成环境中剥离。此时,任何手动调用这些函数的代码(还没从生产环境中剥离的)都会产生报错。 | |
在 React 未来的主要版本(major release)中。执行 PropType 校验函数的代码应该从生产环境中剥离。此时,任何手动调用这些函数的代码(还没从生产环境中剥离的)都会产生报错。 |
|
||
Inspect the stack trace produced by the warning. You will find the component definition responsible for the PropTypes direct call. Most likely, the issue is due to third-party PropTypes that wrap React’s PropTypes, for example: | ||
检查警告产生的堆栈跟踪。你将找到涉及 PropTypes 直接调用的组件定义。最有可能的是,问题是由包装(wrap)了 React PropTypes 的第三方的 PropTypes 导致的,举个例子: |
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.
检查警告产生的堆栈跟踪。你将找到涉及 PropTypes 直接调用的组件定义。最有可能的是,问题是由包装(wrap)了 React PropTypes 的第三方的 PropTypes 导致的,举个例子: | |
检查警告产生的堆栈跟踪。你将找到涉及 PropTypes 直接调用的组件定义。很有可能问题是由包装(wrap)了 React PropTypes 的第三方的 PropTypes 导致的,举个例子: |
感觉这样口语化一些
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.
Approved
Deploy preview for zh-hans-reactjs ready! Built with commit 649991f |
…ese (reactjs#115) https://stackblitz.com/edit/react-dont-call-proptypes warning (crash) 重现 call XX 这里的 call 应该是指 JS 里的函数/方法调用 那么我统一翻译成 `调用 XX 函数`
https://stackblitz.com/edit/react-dont-call-proptypes
warning (crash) 重现
call XX
这里的 call 应该是指 JS 里的函数/方法调用
那么我统一翻译成
调用 XX 函数