Directives
指令(directive)向 与 React 服务器组件兼容的捆绑器(bundler) 提供指令(instruction)。
源码命令
'use client'lets you mark what code runs on the client.'use server'marks server-side functions that can be called from client-side code.
这些指令仅在你 使用 React 服务器组件 或构建可适配库时需要。
指令(directive)向 与 React 服务器组件兼容的捆绑器(bundler) 提供指令(instruction)。
'use client' lets you mark what code runs on the client.'use server' marks server-side functions that can be called from client-side code.