-
Couldn't load subscription status.
- Fork 1.1k
docs(cn): Translate 'use memo' directive documentation to Chinese #1827
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 memo' documentation from English to Chinese, including all relevant sections and examples.
|
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! 🙌 |
| <Intro> | ||
|
|
||
| `"use memo"` marks a function for React Compiler optimization. | ||
| `"use 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.
| `"use memo"` 用于标记一个函数,以便 React 编译器对其进行优化。 | |
| `"use memo"` 用于标记一个函数,以便 React 编译器对其进行优化。 |
| * 只有一个函数中的第一个指令会被处理;其余的指令将被忽略。 | ||
| * 指令的效果取决于你的 [`compilationMode`](/reference/react-compiler/compilationMode) 配置。 |
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.
| * 只有一个函数中的第一个指令会被处理;其余的指令将被忽略。 | |
| * 指令的效果取决于你的 [`compilationMode`](/reference/react-compiler/compilationMode) 配置。 | |
| * 只有一个函数中的第一个指令会被处理;其余的指令将被忽略。 | |
| * 指令的效果取决于你的 [`compilationMode`](/reference/react-compiler/compilationMode) 配置。 |
| plugins: [ | ||
| ['babel-plugin-react-compiler', { | ||
| compilationMode: 'annotation' // or 'infer' or 'all' | ||
| compilationMode: 'annotation' // 或 'infer' 或 'all' |
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.
| compilationMode: 'annotation' // 或 'infer' 或 'all' | |
| compilationMode: 'annotation' // 或 'infer' 和 'all' |
Translated the 'use memo' documentation from English to Chinese, including all relevant sections and examples.