React
教程
参考
社区
博客

    react@18.2.0

  • 总览
  • Hook
    • use - This feature is available in the latest Canary
    • useCallback
    • useContext
    • useDebugValue
    • useDeferredValue
    • useEffect
    • useId
    • useImperativeHandle
    • useInsertionEffect
    • useLayoutEffect
    • useMemo
    • useOptimistic - This feature is available in the latest Canary
    • useReducer
    • useRef
    • useState
    • useSyncExternalStore
    • useTransition
  • 组件
    • <Fragment> (<>)
    • <Profiler>
    • <StrictMode>
    • <Suspense>
  • API
    • cache - This feature is available in the latest Canary
    • createContext
    • forwardRef
    • lazy
    • memo
    • startTransition
    • experimental_taintObjectReference - This feature is available in the latest Canary
    • experimental_taintUniqueValue - This feature is available in the latest Canary
  • Directives - This feature is available in the latest Canary
    • 'use client' - This feature is available in the latest Canary
    • 'use server' - This feature is available in the latest Canary
  • react-dom@18.2.0

  • Hook
    • useFormState - This feature is available in the latest Canary
    • useFormStatus - This feature is available in the latest Canary
  • 组件
    • Common (e.g. <div>)
    • <form> - This feature is available in the latest Canary
    • <input>
    • <option>
    • <progress>
    • <select>
    • <textarea>
  • API
    • createPortal
    • flushSync
    • findDOMNode
    • hydrate
    • render
    • unmountComponentAtNode
  • 客户端 API
    • createRoot
    • hydrateRoot
  • 服务端 API
    • renderToNodeStream
    • renderToPipeableStream
    • renderToReadableStream
    • renderToStaticMarkup
    • renderToStaticNodeStream
    • renderToString
  • 过时的 API

  • 过时的 React API
    • Children
    • cloneElement
    • Component
    • createElement
    • createFactory
    • createRef
    • isValidElement
    • PureComponent

这个页面对你有帮助吗?

API 参考

Directives - This feature is available in the latest Canary

Canary

这些指令仅在你 使用 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.
上一页experimental_taintUniqueValue下一页'use client'

你觉得这些文档怎么样?

参与我们的调查吧!

©2025
学习 React
快速入门
安装
描述 UI
添加交互
状态管理
逃脱方案
API 参考
React API
React DOM API
社区
行为准则
团队
文档贡献者
鸣谢
了解更多
博客
React Native
隐私政策
条款

On this page

  • Overview
  • 源码命令