Careeroza
Built-in Hooks Overview
The Main Hooks
| Hook | Use it to | Module |
|---|---|---|
| useState | store a value that updates the UI | useState Hook |
| useEffect | run side effects: fetch, timers, subscriptions | useEffect Hook |
| useContext | read shared data without passing props | useContext Hook |
| useRef | access DOM elements / keep a value without re-render | useRef Hook |
| useReducer | manage complex state with actions | useReducer Hook |
| useMemo | cache an expensive calculation | useMemo Hook |
| useCallback | cache a function between renders | useCallback Hook |
| useLayoutEffect | measure the DOM before the browser paints | useLayoutEffect Hook |
| useId, useTransition, useDeferredValue | ids, non-urgent updates | Other Hooks |
| Your own useXyz | reuse logic between components | Custom Hooks |