Supporta l'Ucraina 🇺🇦
🇺🇦
Aiuta a fornire aiuto umanitario all'Ucraina.
React
Impara
Riferimento
Comunità
Blog

    react@18.2.0

  • Hooks
    • useCallback
    • useContext
    • useDebugValue
    • useDeferredValue
    • useEffect
    • useId
    • useImperativeHandle
    • useInsertionEffect
    • useLayoutEffect
    • useMemo
    • useReducer
    • useRef
    • useState
    • useSyncExternalStore
    • useTransition
  • Components
    • <Fragment> (<>)
    • <Profiler>
    • <StrictMode>
    • <Suspense>
  • APIs
    • createContext
    • forwardRef
    • lazy
    • memo
    • startTransition
  • Directives
    • 'use client'
    • 'use server'
  • react-dom@18.2.0

  • Components
    • Common (e.g. <div>)
    • <input>
    • <option>
    • <progress>
    • <select>
    • <textarea>
  • APIs
    • createPortal
    • flushSync
    • findDOMNode
    • hydrate
    • 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

Directives

React uses two directives to provide instructions to bundlers compatible with React Server Components.


Source code directives

  • 'use client' marks source files whose components execute on the client.
  • 'use server' marks server-side functions that can be called from client-side code.
PreviousstartTransitionNext'use client'

How do you like these docs?

Take our survey!

©2023
Impara React
Avvio Rapido
Installazione
Descrivere la UI
Aggiungere Interattività
Gestione dello State
Uscite di Emergenza
API di Riferimento
React APIs
React DOM APIs
Comunità
Codice di Condotta
Incontra il Team
Collaboratori Docs
Riconoscimenti
Di Più
Blog
React Native
Privacy
Termini

In questa pagina

  • Overview
  • Source code directives