Loading...
Loading...
Compare original and translation side by side
/docs-voice/docs-voice---
title: Page Title
---
<Intro>
1-3 sentences introducing the concept. Use *italics* for new terms.
</Intro>
<YouWillLearn>
* Learning outcome 1
* Learning outcome 2
* Learning outcome 3-5
</YouWillLearn>---
title: Page Title
---
<Intro>
1-3句话介绍核心概念。新术语使用*斜体*标注。
</Intro>
<YouWillLearn>
* 学习成果1
* 学习成果2
* 学习成果3-5
</YouWillLearn><YouWillLearn isChapter={true}>
* [Sub-page title](/learn/sub-page-name) to learn...
* [Another page](/learn/another-page) to learn...
</YouWillLearn><YouWillLearn isChapter={true}>
* [子页面标题](/learn/sub-page-name) - 学习...
* [另一页面](/learn/another-page) - 学习...
</YouWillLearn>
**Important:** Chapter intro pages do NOT include `<Recap>` or `<Challenges>` sections.
**重要提示:** 章节介绍页面**不包含**`<Recap>`或`<Challenges>`组件。<Intro>
Brief statement of what will be built
</Intro>
<Note>
Alternative learning path offered
</Note>
Table of contents (prose listing of major sections)<Intro>
简要说明将完成的项目内容
</Intro>
<Note>
提供可选的学习路径
</Note>
目录(列出主要章节的文字说明)undefinedundefined<YouWillLearn>
* [Link to section](#section-anchor)
* [Link to another section](#another-section)
</YouWillLearn><YouWillLearn>
* [章节链接](#section-anchor)
* [另一章节链接](#another-section)
</YouWillLearn>undefinedundefined{/*kebab-case*/}undefined{/*短横线命名法*/}undefined
**ID Generation Rules:**
- Lowercase everything
- Replace spaces with hyphens
- Remove apostrophes, quotes
- Remove or convert special chars (`:`, `?`, `!`, `.`, parentheses)
**Examples:**
- "What's React?" → `{/*whats-react*/}`
- "Step 1: Create the context" → `{/*step-1-create-the-context*/}`
- "Conditional (ternary) operator (? :)" → `{/*conditional-ternary-operator--*/}`
**ID生成规则:**
- 全部使用小写字母
- 空格替换为短横线
- 省略撇号、引号
- 移除或转换特殊字符(`:`, `?`, `!`, `.`, 括号等)
**示例:**
- "What's React?" → `{/*whats-react*/}`
- "Step 1: Create the context" → `{/*step-1-create-the-context*/}`
- "Conditional (ternary) operator (? :)" → `{/*conditional-ternary-operator--*/}`// 🔴 Avoid:// ✅ Good:// 🔴 避免:// ✅ 推荐:undefinedundefined
**As inline lists:**
```markdown
To implement this:
1. **Declare** `inputRef` with the `useRef` Hook.
2. **Pass it** as `<input ref={inputRef}>`.
3. **Read** the input DOM node from `inputRef.current`.
**作为内联列表:**
```markdown
实现步骤:
1. **声明** 使用`useRef` Hook创建`inputRef`。
2. **传递** 将其作为`<input ref={inputRef}>`属性。
3. **读取** 从`inputRef.current`获取输入框DOM节点。"When you're not sure whether some code should be in an Effect or in an event handler, ask yourself why this code needs to run."
“当你不确定代码应该放在Effect还是事件处理函数中时,问问自己为什么这段代码需要执行。”
<Intro><YouWillLearn><Note><Pitfall><DeepDive><Recap><Challenges>/docs-components<Intro><YouWillLearn><Note><Pitfall><DeepDive><Recap><Challenges>/docs-components/docs-sandpack/docs-sandpack[concept name](/learn/page-name)
[`useState`](/reference/react/useState)
[section link](/learn/page-name#section-id)
[MDN](https://developer.mozilla.org/...)[概念名称](/learn/page-name)
[`useState`](/reference/react/useState)
[章节链接](/learn/page-name#section-id)
[MDN](https://developer.mozilla.org/...)------------## Title {/*title-id*/}isChapter={true}<LearnMore>/docs-components/docs-components/docs-sandpack## 标题 {/*title-id*/}isChapter={true}<LearnMore>/docs-components/docs-components/docs-sandpack