Your guide to what's next.
Built-in React hooks
Apr 17, 2020

Built-in React hooks

The list of built-in React hooks.

React 16 introduced hooks, a new way of using stateful features in React components. React both has built-in hooks and provides a way to write custom hooks.

The following table summarizes the built-in React hooks:

useStateProvides a way to store and update a stateful value. Updating the value triggers re-rendering.
useEffectUsed to perform side effects. By default, the effect runs after each render.
useLayoutEffectUnlike useEffect, fires synchronously after DOM mutations while re-rendering.
useContextReturns the current value of a React context.
useReducerSimilar to useState, but uses the same signature as Redux reducers.
useMemoReturns a memoized value.
useCallbackReturns a memoized callback.
useRefUsed to store component instance variables.
useImperativeHandleUsed with forwardRef for exposing ref handlers to parent components.
useDebugValueUsed for development/debugging.
See also
Declaring custom JSX/HTML attributes in TypeScript
How to specify non-standard JSX/HTML attributes in TypeScript?
Multi-<select> in React
How to implement a controlled multi-<select> in React?
<select> in React
How to implement a controlled <select> in React?