Spec-Zone.ru › React 18

Legacy React APIs

These APIs are exported from the react package, but they are not recommended for use in newly written code. See the linked individual API pages for the suggested alternatives.


Legacy APIs

  • Children lets you manipulate and transform the JSX received as the children prop. See alternatives.
  • cloneElement lets you create a React element using another element as a starting point. See alternatives.
  • Component lets you define a React component as a JavaScript class. See alternatives.
  • createElement lets you create a React element. Typically, you’ll use JSX instead.
  • createRef creates a ref object which can contain arbitrary value. See alternatives.
  • isValidElement checks whether a value is a React element. Typically used with cloneElement.
  • PureComponent is similar to Component, but it skip re-renders with same props. See alternatives.

Deprecated APIs

Deprecated

These APIs will be removed in a future major version of React.

  • createFactory lets you create a function that produces React elements of a certain type.

© 2013–present Facebook Inc.
Licensed under the Creative Commons Attribution 4.0 International Public License.
https://18.react.dev/reference/react/legacy

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API