HomeInsightsToolsContact
Eckher
Your guide to what's next.
Eckher
English
Home › Eckher Insights › 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:

HookDescription
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.
Cover
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?
Eckher
Your guide to what's next.
Copyright © 2021 Eckher. Various trademarks held by their respective owners.