Join us for React Conf on May 15-16.
Learn more.
React
Learn
Reference
Community
Blog

    react@18.2.0

  • Overview
  • Rules of React
    • Side effects must run outside of render
    • Components must be idempotent
    • Props and state are immutable
    • Never call component functions directly
    • Never pass around Hooks as regular values
    • Only call Hooks at the top level
    • Only call Hooks from React functions
    • Values are immutable after being passed to JSX
    • Return values and arguments to Hooks are immutable
  • Hooks
    • 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
  • Components
    • <Fragment> (<>)
    • <Profiler>
    • <StrictMode>
    • <Suspense>
  • APIs
    • 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

  • Hooks
    • useFormState - This feature is available in the latest Canary
    • useFormStatus - This feature is available in the latest Canary
  • Components
    • 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
  • APIs
    • 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
  • Client APIs
    • createRoot
    • hydrateRoot
  • Server APIs
    • renderToNodeStream
    • renderToPipeableStream
    • renderToReadableStream
    • renderToStaticMarkup
    • renderToStaticNodeStream
    • renderToString
  • Legacy APIs

  • Legacy React APIs
    • Children
    • cloneElement
    • Component
    • createElement
    • createFactory
    • createRef
    • isValidElement
    • PureComponent

Is this page useful?

API Reference
Rules of React

Values are immutable after being passed to JSX

TODO

PreviousOnly call Hooks from React functions
NextReturn values and arguments to Hooks are immutable

How do you like these docs?

Take our survey!

©2024
Learn React
Quick Start
Installation
Describing the UI
Adding Interactivity
Managing State
Escape Hatches
API Reference
React APIs
React DOM APIs
Community
Code of Conduct
Meet the Team
Docs Contributors
Acknowledgements
More
Blog
React Native
Privacy
Terms