react: Other APIs
In addition to Hooks, the react
package exports a few components and other APIs that are useful for defining components. This page lists all the modern React APIs that are not Hooks.
Built-in React components
React exposes a few built-in components that you can use in your JSX.
<Fragment>
, alternatively written as<>...</>
, lets you group multiple JSX nodes together.<Suspense>
lets you display a fallback while the child components are loading.<StrictMode>
enables extra development-only checks that help you find bugs early.
Other React APIs
createContext
lets you define and provide context to the child components. Used withuseContext
.forwardRef
lets your component expose a DOM node as a ref to the parent. Used withuseRef
.lazy
lets you defer loading a component’s code until it’s rendered for the first time.memo
lets your component skip re-renders with same props. Used withuseMemo
anduseCallback
.startTransition
lets you mark a state update as non-urgent. Similar touseTransition
.