5 月 15 日至 16 日加入我們的 React Conf。
了解更多。
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
    • 快取 - 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 框架
  • 指令 - 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 框架
  • 元件
    • 常見(例如 <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 的規則
  • 舊版 API

  • 舊版 React API
    • 子節點
    • cloneElement
    • Component
    • createElement
    • createFactory
    • createRef
    • isValidElement
    • PureComponent

此頁面有幫助嗎?

API 參考

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

金絲雀

如果您正在使用 React Server Components或建立與它們相容的函式庫,則僅需要這些指令。

指令提供說明給與 React Server Components 相容的套件管理工具。


原始程式碼指令

  • 'use client' 讓您標記在用戶端執行的程式碼。
  • 'use server' 標記伺服器端函式,可從用戶端程式碼呼叫。
Previousexperimental_taintUniqueValue
Next'use client'

您喜歡這些文件嗎?

參加我們的調查!

©2024
學習 React
快速入門
安裝
描述 UI
加入互動性
管理狀態
逃生艙口
API 參考
React API
React DOM API
社群
行為準則
認識團隊
文件貢獻者
致謝
更多
部落格
React Native
隱私權
條款

在此頁面上

  • 概觀
  • 原始碼指令