Skip to content

docs(cn): translate reference/react/directives into Chinese #1247

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

Merged
merged 2 commits into from
Jul 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/content/reference/react/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ title: "Directives"

<Intro>

React uses two directives to provide instructions to [bundlers compatible with React Server Components](/learn/start-a-new-react-project#bleeding-edge-react-frameworks).
React 使用两个命令(directive)向 [与 React 服务器组件兼容的捆绑器(bundler)](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) 提供指令。

</Intro>

---

## Source code directives {/*source-code-directives*/}
## 源码命令 {/*source-code-directives*/}

* [`'use client'`](/reference/react/use-client) marks source files whose components execute on the client.
* [`'use server'`](/reference/react/use-server) marks server-side functions that can be called from client-side code.
* [`'use client'`](/reference/react/use-client) 标记其组件在客户端上执行的源文件。
* [`'use server'`](/reference/react/use-server) 标记可以从客户端代码调用的服务器函数。