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 the- childrenprop. 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 with- cloneElement.
- PureComponentis similar to- Component, but it skip re-renders with same props. See alternatives.
Deprecated APIs
- createFactorylets you create a function that produces React elements of a certain type.