Support Ukraine 🇺🇦
🇺🇦
Help Provide Humanitarian Aid to Ukraine.
React
Сурах
Лавлах
Нэгдэл
Блог

    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

Энэ хуудас хэрэг болж байна уу?

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!

©2024
React сурах
Хурдан Эхлэх
Суулгах
UI-г тодорхойлох
Интеракц нэмэх
Төлөв удирдах
Escape Hatches
API лавлах
React API
React DOM API
Community
Ёс зүйн дүрэм
Багийн мэдээлэл
Docs Contributors
Талархал
Илүү их
Блог
React Native
Нууцлал
Ашиглах нөхцөл

On this page

  • Overview
  • Source code directives