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
-
Childrenlets you manipulate and transform the JSX received as thechildrenprop. See alternatives. -
cloneElementlets you create a React element using another element as a starting point. See alternatives. -
Componentlets you define a React component as a JavaScript class. See alternatives. -
createElementlets you create a React element. Typically, you’ll use JSX instead. -
createRefcreates a ref object which can contain arbitrary value. See alternatives. -
isValidElementchecks whether a value is a React element. Typically used withcloneElement. -
PureComponentis similar toComponent, 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.
-
createFactorylets 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