React 19 keeps every hook from React 18 and adds six more, so you now have 17 built-in hooks at your fingertips.
Below, each hook is grouped by job, explained in one sentence, and paired with a tiny, real-world TypeScript snippet that runs in any Vite, CRA, or Next.js starter.
// useOptimistic – like counter with instant +1, rollback on failimport { useOptimistic, useState } from 'react';export default function Like({ id, initial }: { id: string; initial: number }) { const [likes, setLikes] = useState(initial); const [opt, add] = useOptimistic(likes, l => l + 1); async function like() { add(); try { await fetch(`/api/like/${id}`, { method:'POST' }); setLikes(l => l + 1); } catch { /* auto-rollback */ } } return <button onClick={like}>{opt} ❤️</button>;}
🌐 Promise Hook (NEW)
Hook
Why it exists
4-line demo
use
Await promises inside components
[see below]
// use() – fetch without useEffectimport { use } from 'react';async function getUser(id: string) { const res = await fetch(`/api/user/${id}`); return res.json();}export default function Profile({ id }: { id: string }) { const user = use(getUser(id)); return <h1>Hi {user.name}</h1>;}
🔄 Memoization Hooks
Hook
Why it exists
4-line demo
useMemo
Cache expensive values
const m=useMemo(()=>heavy(v),[v]);
useCallback
Cache function references
const cb=useCallback(fn,[dep]);
🧩 Context Hook
Hook
Why it exists
4-line demo
useContext
Consume context values
const theme=useContext(ThemeCtx);
🪝 Debug Hook
Hook
Why it exists
4-line demo
useDebugValue
Label custom hooks in DevTools
useDebugValue(Count:${count});
✅ TL;DR
Category
Hooks
State
useState, useReducer, useActionState
Ref
useRef, useImperativeHandle
Effect
useEffect, useLayoutEffect, useInsertionEffect
Transition
useTransition, useDeferredValue
Form & Optimistic
useFormState, useFormStatus, useOptimistic
Promise
use
Memoization
useMemo, useCallback
Context
useContext
Debug
useDebugValue
React 19 hooksuseActionState exampleuseOptimistic ReactuseTransition tutorialuseDeferredValue guideuseInsertionEffectReact use hookReact 19 form hooksReact 19 best practicesTypeScript React hooks