-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs(cn): Translate 'use no memo' directive to Chinese #1830
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
base: main
Are you sure you want to change the base?
Conversation
Translated the 'use no memo' directive documentation from English to Chinese.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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! 🙌 |
| ``` | ||
|
|
||
| When a function contains `"use no memo"`, the React Compiler will skip it entirely during optimization. This is useful as a temporary escape hatch when debugging or when dealing with code that doesn't work correctly with the compiler. | ||
| 当一个函数包含 "use no memo" 时,React 编译器会在优化过程中完全跳过它。在调试或处理与编译器不兼容的代码时,这是一个很有用的临时后门。 |
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.
escape hatch 翻译为脱围机制,词汇表里面有这个
| ### 何时使用 `"use no memo"` {/*when-to-use*/} | ||
|
|
||
| `"use no memo"` should be used sparingly and temporarily. Common scenarios include: | ||
| `"use no memo"` s应谨慎并临时使用。常见场景包括: |
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.
英文字母没删完
| #### Debugging compiler issues {/*debugging-compiler*/} | ||
| When you suspect the compiler is causing issues, temporarily disable optimization to isolate the problem: | ||
| #### 调试编译器问题 {/*debugging-compiler*/} | ||
| 当你怀疑编译器引起问题时,可以暂时禁用优化来定位问题: |
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.
isolate 表示的是隔离的意思吧?和定位还是有区别的
|
Fixed this question |
Translated the 'use no memo' directive documentation from English to Chinese.