logo by @sawaratsuki1004
React
版本18.3.1
学习
参考
社区
博客

    react@18.3.1

  • 概述
  • Hooks
    • 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

  • Hooks
    • useFormStatus - This feature is available in the latest Canary 框架
  • 组件
    • 通用组件 (例如 <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 规则

  • 概述
    • 组件和 Hooks 必须是纯函数
    • React 调用组件和 Hooks
    • Hooks 规则
  • React 服务器组件

  • 服务器组件 - This feature is available in the latest Canary 框架
  • 服务器 Actions - This feature is available in the latest Canary 框架
  • 指令 - 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
    • 子组件
    • cloneElement
    • Component
    • createElement
    • createFactory
    • createRef
    • isValidElement
    • PureComponent

此页面对您有帮助吗?

API 参考

指令 - This feature is available in the latest Canary 框架

Canary

只有在使用 React 服务器组件 或构建与其兼容的库时,才需要这些指令。

指令向与 React 服务器组件兼容的打包器提供说明。


源码指令

  • 'use client' 允许您标记在客户端运行的代码。
  • 'use server' 标记可以从客户端代码调用的服务器端函数。
上一页服务器 Actions
下一页'use client'

©2024
不要 uwu 啦
uwu?
Logo by@sawaratsuki1004
学习 React
快速入门
安装
描述 UI
添加交互
管理状态
应急方案
API 参考
React API
React DOM API
社区
行为准则
认识团队
文档贡献者
致谢
更多
博客
React Native
隐私
条款

本页内容

  • 概述
  • 源码指令