Overview of built-in React Hooks
React provides certain built-in Hooks. We have already learned about the basic Hooks that React provides:
useState
in Chapter 2, Using the State HookuseEffect
in Chapter 4, Using the Reducer and Effect HooksuseContext
in Chapter 5, Implementing React Contexts
Additionally, React provides more advanced Hooks, which can be very useful in certain use cases. We already covered the following advanced Hooks:
useReducer
in Chapter 4, Using the Reducer and Effect HooksuseActionState
in Chapter 7, Using Hooks for Handling FormsuseFormStatus
(not covered yet, but similar touseActionState
)useOptimistic
in Chapter 7, Using Hooks for Handling FormsuseTransition
in Chapter 7, Using Hooks for Handling Forms
However, there are still more advanced Hooks that React provides:
useRef
useImperativeHandle
useId
useSyncExternalStore
useDebugValue
useDeferredValue...