Built-in React APIs
In addition to Hooks and Components, the react package exports a few other APIs that are useful for defining components. This page lists all the remaining modern React APIs.
- createContextlets you define and provide context to the child components. Used with- useContext.
- forwardReflets your component expose a DOM node as a ref to the parent. Used with- useRef.
- lazylets you defer loading a component’s code until it’s rendered for the first time.
- memolets your component skip re-renders with same props. Used with- useMemoand- useCallback.
- startTransitionlets you mark a state update as non-urgent. Similar to- useTransition.