logo by @sawaratsuki1004
React
v18.3.1
教程
参考
社区
博客

    react@18.3.1

  • 总览
  • Hook
    • useActionState - 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
    • act
    • cache - This feature is available in the latest Canary
    • createContext
    • forwardRef
    • lazy
    • memo
    • startTransition
    • use - This feature is available in the latest Canary
    • experimental_taintObjectReference - This feature is available in the latest Canary
    • experimental_taintUniqueValue - This feature is available in the latest Canary
  • react-dom@18.3.1

  • Hook
    • 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>
    • <link> - This feature is available in the latest Canary
    • <meta> - This feature is available in the latest Canary
    • <script> - This feature is available in the latest Canary
    • <style> - This feature is available in the latest Canary
    • <title> - This feature is available in the latest Canary
  • API
    • createPortal
    • flushSync
    • findDOMNode
    • hydrate
    • preconnect - This feature is available in the latest Canary
    • prefetchDNS - This feature is available in the latest Canary
    • preinit - This feature is available in the latest Canary
    • preinitModule - This feature is available in the latest Canary
    • preload - This feature is available in the latest Canary
    • preloadModule - This feature is available in the latest Canary
    • render
    • unmountComponentAtNode
  • 客户端 API
    • createRoot
    • hydrateRoot
  • 服务端 API
    • renderToNodeStream
    • renderToPipeableStream
    • renderToReadableStream
    • renderToStaticMarkup
    • renderToStaticNodeStream
    • renderToString
  • React 规则

  • 概述
    • 组件和 Hook 必须是纯粹的
    • React 调用组件和 Hook
    • Hook 的规则
  • React Server Components

  • Server Components - This feature is available in the latest Canary
  • Server Actions - 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
  • 过时的 API

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

这个页面对你有帮助吗?

API 参考

指示符 - This feature is available in the latest Canary

Canary

这些指令仅在 使用 React 服务器组件 或构建可适配库时需要。

指示符(directive)向 与 React 服务器组件兼容的捆绑器 提供指令(instruction)。


源码命令

  • 使用 'use client' 标记运行在客户端的代码。
  • 使用 'use server' 标记可以被客户端代码调用的服务端函数。
上一页Server Actions
下一页'use client'

Copyright © Meta Platforms, Inc
no uwu plz
uwu?
Logo by@sawaratsuki1004
学习 React
快速入门
安装
描述 UI
添加交互
状态管理
脱围机制
API 参考
React API
React DOM API
社区
行为准则
团队
文档贡献者
鸣谢
了解更多
博客
React Native
隐私政策
条款

目录

  • 概览
  • 源码命令