Skip to content

Commit 8d81fe9

Browse files
authored
docs: Fixed some space question
1 parent 7c9cfcd commit 8d81fe9

File tree

1 file changed

+5
-5
lines changed
  • src/content/reference/react-compiler/directives

1 file changed

+5
-5
lines changed

src/content/reference/react-compiler/directives/use-memo.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ titleForTitleTag: "'use memo' 指令"
55

66
<Intro>
77

8-
`"use memo"` 用于标记一个函数,以便 React 编译器对其进行优化。
8+
`"use memo"` 用于标记一个函数,以便 React 编译器对其进行优化。
99

1010
</Intro>
1111

@@ -104,7 +104,7 @@ function ButtonGroup({ buttons }) {
104104
module.exports = {
105105
plugins: [
106106
['babel-plugin-react-compiler', {
107-
compilationMode: 'annotation' // 或 'infer' 'all'
107+
compilationMode: 'annotation' // 或 'infer' 'all'
108108
}]
109109
]
110110
};
@@ -124,7 +124,7 @@ function ProductList({ products }) {
124124
}
125125
```
126126

127-
#### Infer 模式(默认) {/*infer-mode-example*/}
127+
#### Infer 模式(默认){/*infer-mode-example*/}
128128
```js
129129
// 会被自动记忆化,因为它的命名符合组件规范
130130
function ComplexDashboard({ data }) {
@@ -148,9 +148,9 @@ function simpleDisplay({ text }) {
148148
要确认你的组件是否被成功优化,可以:
149149

150150
1. 检查你构建产物中被编译后的输出代码
151-
2. 使用 React 开发工具检查组件是否带有 Memo ✨ 徽章
151+
2. 使用 React 开发工具检查组件是否带有 Memo ✨ 徽章
152152

153-
### 另请参阅 {/*see-also*/}
153+
### 参见 {/*see-also*/}
154154

155155
* [`"use no memo"`](/reference/react-compiler/directives/use-no-memo) - 选择退出编译
156156
* [`compilationMode`](/reference/react-compiler/compilationMode) - 配置编译行为

0 commit comments

Comments
 (0)