-
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 reference/react/useInsertionEffect into Chinese #1166
docs(cn): translate reference/react/useInsertionEffect into Chinese #1166
Conversation
Size changes📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
由于本篇文档主题原因,原文出现了大量 ”Effect“,而有的时候翻译为了”副作用“,有的时候保留了原文,因此除去 review 当中直接提及的,可以再多考虑本篇文档中对 ”Effect“ 的处理。 |
收到,辛苦校对 |
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
参考了 React 中文翻译指南 #2 后,我认为本文正文中出现的五次 Effect(包含 Effects)均应不翻译。 |
另外,对本文中部分用词进行了修改,辛苦再次校对。 @Yucohny |
|
||
* Effect 只在客户端上运行,在服务端渲染中不会运行。 | ||
* 你不能在 `useInsertionEffect` 内部更新 state。 | ||
* 在 `useInsertionEffect` 运行期间,refs 还没有附加,DOM 也还没有更新。 |
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.
* 在 `useInsertionEffect` 运行期间,refs 还没有附加,DOM 也还没有更新。 | |
* 在 `useInsertionEffect` 运行期间,ref 还没有附加,DOM 也还没有更新。 |
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.
当初翻译的时候,考虑如下:
ref
如果用于计算值的时候,使用 赋值 比较合适;ref
如果用于DOM
的时候,使用 赋值 感觉差点意思,故使用了attach
的直译 附加;
暂未想到对 attach
更好的表达方式,但是 赋值 并无不妥之处。如同意,我会将其改为 赋值。
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.
可以考虑加个因果关系?类似于:因为 DOM 还没有更新,所以 ref 还没有被赋值。
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.
可以考虑加个因果关系?类似于:因为 DOM 还没有更新,所以 ref 还没有被赋值。
这个因果关系是确认的吗?
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Yucohny <[email protected]>
Co-authored-by: Xleine <[email protected]>
Co-authored-by: Xleine <[email protected]>
Co-authored-by: Xleine <[email protected]>
Co-authored-by: Xleine <[email protected]>
Co-authored-by: Xleine <[email protected]>
reference/react/useInsertionEffect 已翻译完成,辛苦review
@QC-L @Yucohny @awxiaoxian2020